Hello!
I am struggling with calling a clutter function from an extra thread.
I use boost::thread for threading and the clutter library 1.0.
To be specific, the thread contains a looped function that emits boost::signals2::signal with parameters of x and y coordinates every once in a while.
That signal is connected to a function that ha...
Apple's recommended method for multithreading core data is to use a managed object context per thread, and to send changes from one context to another by saving the changed thread's context to a shared persistent store.
While I can imagine that being fine for, eg. an RSS reader, for some applications it seems far from ideal. In my case,...
My question centers on some Parallel.ForEach code that used to work without fail, and now that our database has grown to 5 times as large, it breaks almost regularly.
Parallel.ForEach<Stock_ListAllResult>( lbStockList.SelectedItems.Cast<Stock_ListAllResult>(), SelectedStock =>
{
ComputeTipDown( SelectedStock.Symbol );
} );
The Com...
I've implemented ICallbackEventHandler to handle data sent from the browser's javascript. (The user clicks something, causing eventArgument to be sent to the server. The server invokes a service to obtain regarding that value.)
Everything works great so far, but I actually need to invoke three different services with the same eventArgume...
I am using TheadPoolExecutor that executes on a PriorityQueue. I have set a minimum pool size of 5 and max of 50. When we ran the load test, we saw like 10% jump is CPU. The thread dump shows
pool-1-thread-5" prio=3 tid=0x020f69a0 nid=0xa3 waiting on condition [0xb517f000..0xb517f970]
at sun.misc.Unsafe.park(Native Method)
...
I have some NSOperations subclasses that handle CoreData imports. I believe i've ticked most of the non-main thread issues
I create my own autorelease pool in the
main method
I create a NSManagedObjectContext for each
operation
These operations are loaded into a NSOperationQueue, with the maximum number of concurrent operations set 1...
So this is a very weird situation, and I'm sure not very pythonic. But I'm not actually using this in any production code, I'm just considering how (if?) this could work. It doesn't have to be python specific, but I'd like a solution that at least WORKS within python framework.
Basically, I have a thread safe singleton object that imple...
I want to get a good grasp of multi-threading in c#. I've read some articles that explain the concepts like Joseph Albahari's tutorials, but as you know no matter how much you read, most of it becomes rubbish if you don't practice. I need something that has instructive and pragmatic code examples related to real life practices, not some ...
Hey, I'm Trying to make a programa in C++ that generate triangle, square and sine, waves. I enter the frequence, amplitude, etc, and it calculates the average of the wave. And i cah choose what wave generate by selecting a radio button.
This is a real-time system, so, if a wave is being plotted and if I choose a radio buton corresponden...
How are multithreaded game servers written?
If there are 4 threads, is there one thread running the game loop, and 3 accepting and processing requests? Also: is information sent from the thread running the game loop?
...
I want to make a simple GUI API. Essentially the way it will work is the gui widget is basically a thread in an infinite loop. The thread has a pointer to the widget's class. The way I want it to work is basically similar to WinAPI. I would do something like this:
textbox->SendMessage("Click",args);
which is then added to its queue f...
I'm getting hundreds of these process_reaper threads that build up over time in my application. Anyone have any idea what these may be? They seem to be in my use of Runtime.exec() however I'm destroying my process in a finally statement but they still show up
screen shot:
http://www.dropmocks.com/mBxM5
Process proc = null;
Str...
I have a main program that creates the threads in order:
ThreadB then
ThreadA (which is passed ThreadB's ID)
using the CreateThread function.
Thread A sends a message to Thread B using PostThreadMessage.
B gets the message using GetMessage.
The problem I am having is that PostThreadMessage blocks randomly the first time it is called an...
Please help me. I am struck-up with thread concept. Actually my problem : I want to display the cities List in the combobox. I am getting cities list from the webservice. I am using thread for update the combo box value after webserice call finished.
Here I can call the webservice. But I couldn't get the Reply.
I am using the followin...
Problem: I need to write a function which returns a value for a input key from a map. If function can't found the value in map it will fetch the value from database, write into map for future use and return the same. There can be multiple threads calling this function.
I am thinking on this line:
string GetData (const int key)
{
p...
Hell All.
i was made some python script with thread which checking some of account exist in some website
if i run thread 1 , it working well but if increase thread such like 3~5 and above,
result was very different compare with thread 1 and i was checked manually and
if i increase thread result was not correct.
i think some of my ...
Hello,
If you are reading this (hoping you will be able to help me!), you most probably know that a code like below will start a new thread to do the job. Is there any way I can control the priority of that thread?
Task.Factory.StartNew(() => {
// everything here will be executed in a new thread.
// I want to set the priority o...
I was reading about CopyOnWriteArrayList and was wondering how can I demonstrate data race in ArrayList class. Basically I'm trying to simulate a situation where ArrayList fails so that it becomes necessary to use CopyOnWriteArrayList. Any suggestions on how to simulate this.
...
Can anyone give me insight into why the ServerSocket constructor never returns in the new thread? (I never see the "Opened" message printed to the console.) It seems the main thread prevents the server socket thread from running by entering into readLine too quickly:
public class Main
{
public static void main(String[] args) throws I...
I was just wondering whether we actually need the algorithm to be muti-threaded if it must make use of the multi-core processors or will the jvm make use of multiple core's even-though our algorithm is sequential ?
UPDATE:
Related Question:
Muti-Threaded quick or merge sort in java
...