multithreading

threading concepts

i have started treading in c and also python recently and would like to know any good tutorials available for it ...

Java Threading pass parameter to a thread

Greetings , Can anyone suggest to me how I can pass a parameter to a thread. I can't seem to find anything about it! I'm sure this is quite simple. [Edit] Apologies I was using anonymous classes (Which was the problem) Hit the refactor button :) [/Edit] ...

Is there a difference between Boost's scoped mutex and WinAPi's critical section?

The title says it all. In Windows environment, is Boost's scoped mutex using WinAPI's critical sections, or something else? ...

ASP.NET check on thread status on long running thread?

I have a situation where user requests to do a long running process. I planing to start it on another thread in code-behind and return message to user "processing". Then every couple of seconds or so I will poll(via asynch call) the thread for its status. When thread is done I want to show success message. Question, how do I poll a ...

A Multithreading Question??

class ApplicationContext{ private final NetworkObject networkObject = new networkObject(); public ApplicationContext(){ networkObject.setHost("host"); networkObject.setParams("param"); } public searchObjects(ObjectType objType){ networkObject.doSearch(buildQuery(objType)); } } class NetworkObjec...

Are Java static initializers thread safe?

I'm using a static code block to initialize some controllers in a regsitry I have. My question is therefore, can I guarantee that this static code block will only absolutely be called once when the class is first loaded? I understand I cannot guarantee when this code block will be called, Im guessing its when the Classloader first loads ...

Is changing a pointer considered an atomic action in C?

If I have a multi-threaded program that reads a cache-type memory by reference. Can I change this pointer by the main thread without risking any of the other threads reading unexpected values. As I see it, if the change is atomic the other threads will either read the older value or the newer value; never random memory (or null pointers...

Are Java daemon threads automatically killed when their parent exits?

If a Thread creates a daemon Thread, can I rely on the fact that when the parent exits the run method, the son will also terminate? ...

Can DCOM/ COM+ activated objects deadlock CPU?

How does one figure out CPU level deadlocks for a COM+ application? This is an application running on Win2K. Regardless of the load, 1 object which is used by all other objects starts building up call times suddenly and then the system crashes. The only way to restore the system to its normal working situation is by restarting the COM+ a...

InterlockedExchange and memory alignment

I am confused that Microsoft says memory alignment is required for InterlockedExchange however, Intel documentation says that memory alignment is not required for LOCK. Am i missing something, or whatever? thanks from Microsoft MSDN Library Platform SDK: DLLs, Processes, and Threads InterlockedExchange The variable pointed to by the ...

Developing Kernels to support Multiple CPUs

I am looking to get into operating system kernel development and figured my contribution would be to extend the SANOS operating system in order to support multiple core machines. I have been reading books on operating systems (Tannenbaum) as well as studying how BSD and Linux have tackled this challenge but still am stuck on several conc...

What are the common mistakes that causes the code in Java is not thread safe?

Duplicate: What is the most frequent concurrency problem you’ve encountered in Java? I've been thinking of list of common programming mistakes/pitfalls that causes the code in Java is not thread safe. Here are the common ones that I encountered in the code through the recent years of Java development. Using non-static fields within ...

Methodology for upgrading OS Kernel

I am looking to get into operating system kernel development and figured my contribution would be to extend the SANOS operating system in order to support JDK 1.6 and 1.7. I have been reading books on operating systems (Tannenbaum) as well as studying how BSD and Linux have tackled this challenge but still am stuck on several concepts. ...

object pooling framework

any suggestions for a C# object pooling framework? requirements are multi-thread support and a pool size limit, when a thread requests an object but none is available, it's blocked until one of the other objects is freed. ...

Is there a way to check if an IEnumerable is being accessed using a For Each loop?

Suppose I have an IEnumerable such as a List(TValue) and I want to keep track of whether this list is being accessed (to prevent issues with, say, adding to the list while it is being iterated over on a different thread); I can always write code such as the following: Dim List1 As New List(Of Integer) Dim IteratingList1 As Boolean = Fal...

How can I use the Winforms WebBrowser control in a webapp?

I have developed a library to manipulate HTML to conform to our needs using the WebBrowser control, however I need this library to work on a web app and not a winforms app. The main issue I get is this: "ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' cannot be instantiated because the current thread is not in a single-threaded ...

dot net:threads running too slow in express edition visual studio 2008?

i am running 12 threads .function which these threads are calling is not having any lock on some object.but still these threads are taking too much time.(16 minutes).each thread ially parsing a xml document which is running alright if run indiviually.is this problem because of some reason related max no threads provided by express editio...

Java, Don't wait for a thread to complete

I need to find a way to spin off a thread from a static call and not wait for the thread to complete. Basically, a "fire and forget" approach. Can someone supply me with a simple example of how this can be accomplished? ...

EndInvoke changes current CallContext - why?

I have following test [Test] public void aaa() { CallContext.LogicalSetData("aa", "1"); Action parallelMethod = () => CallContext.LogicalSetData("aa", "2"); var r = parallelMethod.BeginInvoke(null, null); parallelMethod.EndInvoke(r); Assert.That(CallContext.LogicalGetData("aa"), Is.EqualTo("1")); } Can anyone ...

Form opacity animation in C# with a BackgroundWorker

With the help of the BackgroundWorker, I created an opacity animation for some form. There's only one tiny issue with this approach but I can't understand where is the problem. The animation speed is configurable and even if the speed value is very high, sometimes the animations is very, very slow, for some odd reason... The "slow anim...