Questions tagged [shared-resource]

40 questions
0
votes
0 answers

Shared and localized variables in Python closures

Closures in Python behave in an “odd” way, so to say. Consider the following code snippet where I have tried to build a list of closures based on foo in two ways: In bad_closure, closures are built ‘on the fly’, while in good_closure the closures…
AlQuemist
  • 1,110
  • 3
  • 12
  • 22
0
votes
2 answers

Android: ExoPlayer - Audio stream playing in one app stops when exoplayer instance is initialised in another app

There are two apps using Exoplayer. AppA and AppB AppA starts streaming audio. AppB is then launched which initialises the exoplayer instance. NOTE: No stream is yet played on AppB. But right away AppA stops playing the audio. Could someone…
Sunny
  • 7,444
  • 22
  • 63
  • 104
0
votes
1 answer

omp parallel doesn't give any performance increase for matrix multiplication

I'm using following 2 code blocks to compute matrix multiplication serially and parallel. Serial - double** ary1 = new double*[in]; double** ary2 = new double*[in]; double** result = new double*[in]; for (int i=0;i
0
votes
2 answers

C Multithreading - Sqlite3 database access by 2 threads crash

Here is a description of my problem: I have 2 threads in my program. One is the main thread and the other one that i create using pthread_create The main thread performs various functions on an sqlite3 database. Each function opens to perform the…
bunni
  • 1
  • 4
0
votes
1 answer

How do you fix a TeamCity shared resource lock after a hard crash?

Background: I have a TeamCity installation with dozens of build configurations. Many of these build configurations deploy to the same servers. To alleviate any conflicts, I used TeamCity's shared resources feature to control how these builds run.…
Nick Williams
  • 2,864
  • 5
  • 29
  • 43
0
votes
2 answers

Share resources in Java web app

I have a Java web app. Over time it has evolved in to what should really be two apps. There are things like CSS and Javacript files though that both ill need. Is there a way to have them shared so I do not need to duplicate these files. Here is some…
dan
  • 91
  • 5
0
votes
1 answer

How to set expiry for lock on resource?

My program will be utilising a shared resource so a lock on this resource is required. When a processing task on this resource is started it will obtain a lock on the resource. When it completes it will release the lock. To cater for crashes and…
CJ7
  • 22,579
  • 65
  • 193
  • 321
-1
votes
1 answer

Why is HANDLE event object assumed valid in thread function?

Why is HANDLE event object(synchronization object which is created by CreateEvent function) in winapi assumed to be valid in thread function? From multithreading example to microsoft docs code examples, this event object is passed to…
YoonSeok OH
  • 647
  • 2
  • 7
  • 15
-1
votes
2 answers

How to configure datasource jboss 4.2.3 for a jar library that initialize connection in the default context?

we have a jar library util that manage some of the logic of connection to db and store the data in memory. Well, this works fine in tomcat because we can configure the datasource in the $CATALINA_HOME/conf/context.xml and everything work's just…
Enrique San Martín
  • 2,202
  • 7
  • 30
  • 51
-2
votes
1 answer

Shared resource C++

I am trying to make a program that uses shared resources, but all I get in the is std::logic_error. I think I am not using the mutex in the right way. Here is a snippet of the code. #include #include #include #include…
Gabi5537
  • 101
  • 9
1 2
3