Multithreading is how work performed by a computer can be divided into multiple concurrent streams of execution (generally referred to as threads).

learn more… | top users | synonyms (8)

1
vote
0answers
12 views

C++ pthread synchronization and multiple wake up for thread

a question about C++ thread synchronization. We suppose that have 2 pthreads: Thread1 and Thread2. Thread1 is engaged in its task and, in some cases, he must notify the update of the state to the ...
0
votes
0answers
13 views

How to run multiple threads simultaneosly

I am developing an Android application that opens a video stream using the class JavaCameraView, and captures frames from it. Then, my target is to realize a worker thread that saves these frames into ...
1
vote
0answers
14 views

TerminateThread() returns error when terminating the thread

I have a ThreadA created using the CreateThread function. Inside ThreadA, another thread, ThreadB is created using the CreateThread function. Now, I want to terminate ThreadB from ThreadA but the ...
-1
votes
0answers
24 views

effect of sleep(1) after pthread_join()?

I have a question. Why use sleep(1) function after pthread_join() ?? Pthread_join alone is not enough?? I have tried using pthread join without sleep() in some open source code but it resulted in ...
0
votes
2answers
26 views

Different behavior when using ContinueWith or Async-Await

When I use an async-await method (as the example below) in a HttpClient call, this code causes a deadlock. Replacing the async-await method with a t.ContinueWith, it works properly. Why? public class ...
0
votes
1answer
33 views

Is this network design a candidate for improved preformance from non-blocking NIO?

I have a generic turn-based game I'm working on and currently here is how it operates: Client makes request to server. Java server uses connection pool and spawns a new thread to process request. ...
0
votes
2answers
71 views

Liberal thread usage [closed]

I'm writing an application which makes several modifications to my GUI, although never will two points access the same part of the GUI thread. The application is entirely thread safe as it stands, and ...
1
vote
1answer
15 views

Are Dapper QueryMultiple/Query/Execute methods thread safe?

I'm using Dapper QueryMultiple/Query/Execute methods in my .net 4.5 code (Parallel library), I would like to know if it is thread safe. Thank you, Monica
2
votes
2answers
51 views

Faking an insertion in Python Queue

I'm using a Queue in python, and it works something like a channel. That is, whenever you make an insertion, some other thread is waiting and fetches the inserted value. That value is then yield. ...
0
votes
0answers
4 views

How to get cProfile results from a callback function in Python

I am trying to determine which parts of my python code are running the slowest, so that I have a better understanding on what I need to fix. I recently discovered cProfile and gprof2dot which have ...
3
votes
3answers
59 views

Alternatives to using Thread.Sleep for waiting

Firstly I am not asking the same question as this, or that. I don't think I am using it incorrectly and need a genuine alternative for specific situations. During a code analysis run I saw a ...
0
votes
0answers
5 views

Updating the UI control's value in the runtime from background thread.

I know this sound a very simple question. I'm still a newbie in iPad app development. Would you please tell me how would I update the contents in the run time. The following code may be helpful to ...
3
votes
2answers
139 views

Are C++11 objects potentially slower in multi-threaded environments because of the new const?

According to Herb Sutter (http://isocpp.org/blog/2012/12/you-dont-know-const-and-mutable-herb-sutter), in C++11 const methods must not alter the object bit-wise, or must perform internal ...
1
vote
1answer
64 views

Thread safe swapping in Java

I have a method which receives two bank account as inputs and swap their values : Public void TransferAccount(AccountID id1, AccountID id2){ Account a1 = id1.GetAccount(); Account a2 = ...
1
vote
4answers
42 views

Should I use a thread or service to run tasks in the background in Android?

I'm building an Android library to collect data from the host app and send this data to an online server in the background. I realize that this would require some sort of multi-threading/use of a ...

1 2 3 4 5 2543
15 30 50 per page