The multithreading tag has no wiki summary.
3
votes
2answers
28 views
Why would one ever want to use a synchronized method in Enum?
I stumbled upon this question and a couple of other along the same lines.
While we know creation of enum is thread safe and enums are by birth singletons .
It kind of confuses me that why would ...
1
vote
2answers
62 views
timers with threads on queue
So I've been asking the wrong questions for the last three days and after searching a lot I think I have an idea of what I need, my question is how to use timers with two threads writing and reading ...
1
vote
4answers
216 views
Testing thread safety
Say you have a function f that is or contains a critical section. How would you unit test that only one thread can run it at once, that it doesn't have race conditions, and that it doesn't cause a ...
0
votes
0answers
70 views
IPC in C under linux
I'm trying to build a messaging solution with the current setup, I have all the messages saved on a DB, two or more reader processes will read from this DB and try to send it to another process(s) ...
4
votes
1answer
229 views
Need to process 2 million 100k messages per second and route them to a particular event, delegate or multicast delegate
I need to process 2 million messages per second (perhaps in a scale out configuration) and route each message to a N delegates or multicast delegates.
Question
How should I structure my application ...
0
votes
0answers
7 views
Access Violation On Create array of TThread [migrated]
I am creating a multithreaded application, it creates a dynamic array of a class TThread, but the mystery for me, is that it causes an error 'Access Violation' to 'Create'
Code Form:
Unit UNT_Main;
...
3
votes
1answer
178 views
How to read from a database, and write to a file asynchronously / non blocking way in Java
I'm trying to modify a serial program that reads from a database, and writes results to a file, this is done in a blocking way and I think we can get performance boost of there is a memory buffer and ...
1
vote
1answer
41 views
Sharing SCTP connection with multiple threads
I have an application that needs to run in SCTP environment, I have a question in sharing the connection among multiple threads for packet receiving only, I've tried with the sctp_sendmsg and it ...
1
vote
4answers
32 views
Resource/Thread Allocation and Deadlock
Here is the question I'm having trouble with:
Give the resource graph and determine whether a deadlock state results. Assume that when a thread requests an available or unallocated resource, the ...
3
votes
4answers
182 views
What is the minumum code/operations to have in a separate thread?
I understand that threading is needed to get the maximum performance out of today's multicore processors but starting a thread is rather costly so you can't put every single calculation that can be ...
0
votes
0answers
48 views
Application that provides unique keys to multiple threads
Thanks all for your help before.
So, this is what I came up with so far,
the requirements are, application has two or more threads and each thread requires a unique session/transaction ID. is the ...
1
vote
3answers
81 views
Application that provides unique keys to multiple processes
Any idea on how to build an application that provides unique keys each time it get called by another process.
Calling process isn't my problem here, my problem is how to sync between two(or more) ...
5
votes
4answers
131 views
Command-Query-Separation and multithreading safe interfaces
I like the command query separation pattern (from OOSC / Eiffel - basically you either return a value or you change the state of the class - but not both). This makes reasoning about the class easier ...
1
vote
2answers
155 views
Shared memory multiprocesses
I'm building an multi processes application and I need to save session ID, the sessions ID is 32 bit, and of course it can't be used twice in its lifetime, I'm currently using DB that saves all the ID ...
1
vote
1answer
291 views
C++ Multithreading on Unix
I have two related questions:
Are there any good books for multithreading in C++, especially now that C++11 contains multithreading in the standard library?
I have the Wrox Programming on Unix book ...