multithreading

Swing modal dialog refuses to close - sometimes!

// This is supposed to show a modal dialog and then hide it again. In practice, // this works about 75% of the time, and the other 25% of the time, the dialog // stays visible. // This is on Ubuntu 10.10, running: // OpenJDK Runtime Environment (IcedTea6 1.9) (6b20-1.9-0ubuntu1) // This always prints // setVisible(true) about to happen ...

Why is my app crashing when I modify a Core Data relationship in an NSOperation subclass?

Background I've got the following tree of objects: Name Project Users nil John nil Documents nil Acme Project Acme Project <--- User selects a project Proposal.doc Acme Project ...

Ruby Sleep in a Loop in Thread

Hello, I have the exact same problem posted here a year ago: http://stackoverflow.com/questions/1347853/ruby-loop-failing-in-thread Here the code (pretty much the same as in the topic above) class NewObject def my_funk t = Thread.new { until false do puts sleep 15 # sleeps way too much ...

create toast from IntentService

Hello, I'm trying to have my IntentService show a Toast message, but when sending it from the onHandleIntent message, the toast shows but gets stuck and the screen and never leaved. I'm guessing its because the onHandleIntent method does not happen on the main service thread, but how can I move it? Has anyone has this issue and solved i...

pyinotify asyncnotifier thread question

I'm confused about how asyncnotifier works. What exactly is threaded in the notifier? Is the just the watcher threaded? Or does each of the callbacks to the handler functions run on its own thread? The documentation says essentially nothing about the specifics of the class. ...

Threading problem with Monitor.Wait() and Monitor.Pulse()

I have a producer-consumer scenario in ASP.NET. I designed a Producer class, a Consumer class and a class for holding the shared objects and responsible for communication between Producer and Consumer, lets call it Mediator. Because I fork the execution path at start-up (in parent object) and one thread would call Producer.Start() and an...

Java performance issue with Thread.sleep()

Inline Java IDE hint states, "Invoking Thread.sleep in loop can cause performance problems." I can find no elucidation elsewhere in the docs re. this statement. Why? How? What other method might there be to delay execution of a thread? ...

Scope of POSIX Threads

I have been learning thread programming in Java, where there are are sophisticated APIs for thread management. I recently came across this. I am curious to know if these are used now. Is the POSIX thread obsolete or is it the standard used now for threading in C++. I am not familiar with Threading in any other language apart from Java. ...

what is this log ,when ı coded thread.stop()?

10-18 10:26:39.382: ERROR/global(13919): Deprecated Thread methods are not supported. 10-18 10:26:39.382: ERROR/global(13919): java.lang.UnsupportedOperationException 10-18 10:26:39.382: ERROR/global(13919): at java.lang.VMThread.stop(VMThread.java:85) 10-18 10:26:39.382: ERROR/global(13919): at java.lang.Thread.stop(Thread.java:...

posix thread synchronization stop at same code

I have multiple threads, and I want each thread to wait for every others to complete at certain point in the code before proceeding as following: void *run() { for (i=0;i<1000;i++){ do_1st(); // sync() all stop here wait for all then resume do_2nd(); } } I tried to use pthread_cond_wait.. but It seems very complicated...

Two-way communication with a Java thread

In my application I'm performing somewhat heavy lookup operations. These operations must be done within a single thread (persistence framework limitation). I want to cache the results. Thus, I have a class UMRCache, with an inner class Worker: public class UMRCache { private Worker worker; private List<String> requests = Collection...

Good Book/Training material to learn multithreading in C/C++

Hi, I am just a starter at using threads in my code. I use Boost threads usually. But I don't think I have mastered this field yet. I am looking for learning material specifically for advanced parallel programming. Could anybody suggest something. ...

What has improved in .NET 4.0 Threadpooling?

I am reading a C# 4.0 book which gives the following default values for the maximum thread limit for the threadpool. 1023 in Framework 4.0 in a 32-bit environment 32768 in Framework 4.0 in a 64-bit environment 250 per core in Framework 3.5 25 per core in Framework 2.0 Can anyone tell me what might might have prompted such a vast incr...

Call method on the GUI thread from a timers thread

In my application I am using a timer to check for updates in an RSS feed, if new items are found I pop up a custom dialog to inform the user. When I run the check manually everything works great, but when the automatic check runs in the timers Elapsed event the custom dialog is not displayed. First of all is this a thread issue? (I am...

Can one do multithreading in VB6?

If so, does anyone know a good tutorial for it? ...

Can I set a property for an array?

currently I have a variable and a property: private System.Xml.Linq.XDocument myDoc; public System.Xml.Linq.XDocument getMyDoc { get { return myDoc; } set { myDoc = value; } } now I need two docs: private System.Xm...

Use ThreadPool for applicationwide logging?

As a followup on this question discussing the use of the ThreadPool vs a dedicated thread: When would you use a dedicated thread (with lowered priority) for applicationwide logging and when would you use the ThreadPool? ...

Interview question to ask on knowledge of multi-threading

Someone said 90% of programmers cannot solve a binary search. So for a guy who claimed he has in depth understanding on multi-threading technology, what is the basic but ideal question to ask? It can be either C++ or Java. ...

Why were threads never included as part of the C++ standard?

Why is it that threads were never included as part of the C++ standard originally? Did they not exist when C++ standard was first created? ...

Try...catch causes segmentation fault on embedded ARM with posix threads

Hi, Totday, I posted a problem about a segmentation fault after destruction of a std::string (see this post). I've stripped the code so that I don't use the STL and still have a segmentation fault sometimes. The following code works just fine on my PC running Linux. But using the ARM crosscompiler suppplied by the manufactor of our emb...