Multithreading is how work performed by a computer can be divided into multiple concurrent streams of execution (generally referred to as threads).
0
votes
1answer
8 views
Starting a thread from a void method
Using c++ I would like to start a thread from a void method and then return before the thread may have finished. for example:
#include <thread>
using namespace std;
void longFunc(){
//stuff
...
6
votes
1answer
36 views
When performing a calculation - how many threads should I open?
I am writing a program that performs some long computation, which I can break into as many tasks as I want. For the sake of discussion, let's suppose I am writing an algorithm for finding whether or ...
2
votes
1answer
21 views
Multi-threading in Scala — dealing only with immutibility
I have the code of Scala
class MyClass {
private val myData: Map[String, MyClass2] = new HashMap[String, MyClass2]()
def someMethod = {
synchronized(myData) {
val id = getSomeId
...
0
votes
2answers
12 views
Win32 Uderstanding semaphore
I'm new to Multithread in Win32. And I have an assignment with Semaphore. But I cannot understand this.
Assume that we have 20 tasks (each task is the same with other tasks). We use semaphore then ...
0
votes
1answer
15 views
Parallel Execution with pthread_cond_broadcast?
I would like to use pthread_cond_broadcast() to wake up all threads that is waiting for the same condition.
However, it seems like those threads can't really run in parallel because they have to ...
0
votes
4answers
53 views
Killing child thread from parent thread in java
I am working in java android platform. I am creating a child thread from main thread. I want to stop child thread as my requirments. My child thread has simple function which doesn't have any loop. I ...
0
votes
1answer
46 views
Calling methods in main thread from other threads
I am trying to run 3 levels of timers at the same time in a C# application
for example:
T1 will run in the beginning of the application, then on its Tick event, T2 will start
and then on the tick ...
0
votes
1answer
43 views
What's wrong with my while loop in Client?
I've got problem with loop. In my project I'm sending a comments from match through socket.
I know that something is wrong with one of my loops because in client last comment is still printed.
...
0
votes
1answer
16 views
How to run separate threads in pygtk
I have a pygtk application which runs as soon as my python script is opened. Along with gtk.main() I have a thread which is started at the beginning of the script, which refreshes a gtk.TextView() ...
1
vote
1answer
23 views
How safely (thread-safe) alter global variable from indexedDB callbacks?
I am kicking off a bunch of indexeddb actions and want them to be able to increment a counter (and change some other things as well, but for this question, just assume it's incrementing a counter) ...
0
votes
1answer
22 views
How do I run a thread run() inside of the GUI's actionPerformed() method?
This is my first time doing multi-threading and I'm kind of stuck on how to make two threads, "Reader" thread and "Writer" thread execute only when the JButton "jbStart" is clicked? I can't put the ...
0
votes
0answers
32 views
how to return value from new Thread by ThreadManager.createThreadForCurrentRequest(new Runnable() gae java
there are 2 part . I am use google app engine java.
1, task Queue, to start 2 process
2, each process using ThreadManager.createThreadForCurrentRequest(new Runnable() {
for 2 Thread
I expect to set ...
2
votes
1answer
34 views
C# Local heaps for threads in multithread process
I have a multithread process in C#, and every thread quite often tries to allocate memory from the heap. This entails in multiple heap's locks and therefore reduces advantage from threading.
Is there ...
0
votes
0answers
22 views
How to log into separate files per thread using EclipseLink
Scenario: Multi-threaded application that interacts with a relational database using EclipseLink JPA Implementation
Desired: Having each thread to log SQL activity to a different file
The ...
0
votes
1answer
21 views
Asynchronous Events Not Outputting to the Console
I just created my first multithreaded program, and it is not working. The following is the smallest complete program I could come up with that portrays what I am trying to do.
Essentially, I created: ...