Questions tagged [shared-resource]
40 questions
2
votes
1 answer
Data consistency algorithm
I am developing 2-4 players networks game.
At the heart of the model there is a data structure that acts like a google-docs spreadsheet that everybody can edit in any time.
For simplicity, each of the spreadsheet cells can contain only one…

Yony
- 680
- 1
- 9
- 20
2
votes
2 answers
Android and iOS cross-platform string resources (MonoTouch & MonoDroid)
I'm busy with a cross-platform mobile app using the Xamarin mono libraries and I ran into the following situation...
I've got a bunch of string resources in my monodroid project (strings.xml) that are being used by my layouts and my C# code.
What I…

Nieldev
- 211
- 1
- 10
2
votes
1 answer
How can you share a resource between ListBox item instances?
We have a custom-rendered ListBox which maintains an instance of a StreamGeometry object that is based on its width. The control needs to then share that StreamGeometry instance with all of its items for rendering purposes.
Only way we can think is…

Mark A. Donohoe
- 28,442
- 25
- 137
- 286
1
vote
1 answer
C++, how to make efficient, 1 shared array of resources for multiple threads
Description:
I have multiple threads (4-32). These threads can all access an array: int resources[1024].
Resources array contains different values (0-1023). There can only be one instance of a single resource(int). Each thread requires different…

Jan Koten
- 13
- 2
1
vote
0 answers
Shared resource manager
I'm a consultant for test automation, and recently I encountered a similar need in few different projects. Due to my role, naturally they all related to test automation, but I believe that a similar need is relevant to many other projects as well.…

Arnon Axelrod
- 1,444
- 2
- 13
- 21
1
vote
2 answers
How to handle shared resources with pthread mutex
I have a question regarding mutex and pthreads.
If there is a shared flag, lets call it (F1). And there are multiple threads.
But only one thread (T1) can raise/cease the flag and all other threads (T2..Tn) only reads or pulls the status.
Is it…

Zäta
- 322
- 3
- 8
1
vote
0 answers
Android Studio Add external resource
I am working on an android app, which is based on libgdx framework.
I need to test the app on my pc, so I set up Android Studio to build me an apk or a normal java jar.
But I need to pack my resources (images, audio, allways the same for both) into…

Benedikt M.
- 145
- 1
- 13
1
vote
5 answers
How do you create and later access an application level resource?
Edit: I am trying to create a shared database connection pool for all sessions of a web application. A different post said the best way to create a servlet context object was by having the init listener create it. I am however unclear on how to make…

user3056052
- 1,387
- 2
- 13
- 16
0
votes
0 answers
Shared resource single thread writing, multiple thread reading using interlock
I'm trying to implement single thread writing, multiple thread reading mechanism for shared resource management using interlock in C++, windows environment.
Q1. The result code seems to work as what I intend, but I'd like to ask for your wisdom if I…

YoonSeok OH
- 647
- 2
- 7
- 15
0
votes
1 answer
Is there a synchronization lock with key in Python?
I need a Lock object, similar to multiprocessing.Manager().Lock() which only is allowed to be released from the process which actually has acquired it.
My manual implementation would be something similar to the following:
class KeyLock:
def…

Stefan Meier
- 123
- 1
- 1
- 9
0
votes
1 answer
Multiple apps running on Docker process files in shared directory
I have two or more PHP apps running on Docker that process files in a shared directory. So I need a lock system to prevent those apps working on the same file.
Ex: there are 3 files in the directory, if app1 works on file1, app2 have to skip this…

Yoyo
- 1
- 2
0
votes
1 answer
Shared resource localization is not working
I am working on shared resource localization in Asp .Net Core 3.1. For that I created resource directory and created SharedResources.cs file.
Root/Resources/SharedResources.cs
Root/Resources/SharedResources.en.resx
I injected code in…

Abhi Singh
- 321
- 3
- 14
0
votes
0 answers
Redis shared resource - two or more python scripts update the same hash but different keys, what happens?
I'm designing a data pipeline where I need to run several python scripts in parallel updating Redis hashes and ttl, they will update same hashes but different keys. Although each will update hash TTL also.
Would I face the shared resource issue?
I…

talkhouon
- 21
- 5
0
votes
1 answer
Class shared resource - correct solution?
This is not homework, just a question about my code (I'm learning C++).
I have multiple instances of the class Renderer that all use the same resource, a BMP loaded by SDL. Is this a correct way to manage a shared resource for a class? If not, what…

orlp
- 112,504
- 36
- 218
- 315
0
votes
0 answers
Intellisense not working on shared ressources files between projects (Visual Studio 2015)
I'm working on a asp.net MVC solution.
I have created a common resources folder in my solution. The goal is to use the same resources files in different projects.
To do this, I followed this great tutorial :…