multithreading

FileIO out of order when using subprocesses in Python

I am trying to generate a log file with information in order. This is what I have: class ExecThread(threading.Thread): def __init__(self, command): self.command = command self._lock = threading.Lock() threading.Thread.__init__ ( self ) def run ( self ): self._lock.acquire() sys.stdout.write(''.join(["Executing: ",self.comma...

Does oneway declaration in Android .aidl guarantee that method will be called in a separate thread?

I am designing a framework for a client/server application for Android phones. I am fairly new to both Java and Android (but not new to programming in general, or threaded programming in particular). Sometimes my server and client will be in the same process, and sometimes they will be in different processes, depending on the exact use ...

Where to begin with multi-threaded programming with c++?

I'm trying to implement my own IRC client as a personal proejct and I realized I needed a way to read and write from the socket at the same time. I realized I could have a reading thread which reads from the socket in the background and puts data in a queue and I could have another thread which writes data from a queue to the socket. How...

Is multi-threading a property of a language (like java) or a property of OS?

Is multi-threading a property of a language (like java) or a property of OS? ...

Has anybody got success in texture loading using a secondary thread on iphone?

I have been trying improve the performance of my game on iphone. Most of the cases, I do my all texture loading just before rendering the current frame. That makes big jerk in the frame rate. Anybody tried loading texture in secondary thread or something like that? ...

What is the diff. between a thread/process/task?

What is the diff. between a thread/process/task? ...

Detecting a stale Mutex

Is there any technique or tool available to detect this kind of a deadlock during runtime? picture this in a worker thread (one of several, normally 4-6) try WaitForSingleObject(myMutex); DoSTuffThatMightCauseAnException; except ReleaseMutex(myMutex); end; or more generally is there a design-pattern to avoid these kind of bu...

Multiprocessing vs Threading Python

Hello, I am trying to understand the advantages of the module Multiprocessing over Threading. I know that Multiprocessing get's around the Global Interpreter Lock, but what other advantages are there, and can threading not do the same thing? ...

Performance issue on Android's MapView Navigation-App

Hey Guys, I've got a question on making an navigation app more faster and more stable. The basic layer of my app is a simple mapview, covered with several overlays (2 markers for start and destination and one for the route). My idea is to implement a thread to display the route, so that the app won't hang up during the calculation of ...

HttpWebResponse get mixed up when used inside multiple threads

In my Application I have a few threads who will get data from a web service. Basically I just open an URL and get an XML output. I have a few threads who do this continuously but with different URLs. Sometimes the results are mixed up. The XML output doesn't belong to the URL of a thread but to the URL of another thread. In each thread ...

How can i start a MultiThread Heavy Excel data to add Sql Table?

i want to start Multi Thread while adding 20000 rows Excel Data to sql data.How can i do that? (this is windows Application) ...

How can solve "Cross-thread operation not valid"?

i try to start multi Thread but i can not it returns to me error: Cross-thread operation not valid: 'listBox1' thread was created to control outside access from another thread was. MyCodes: public DataTable dTable; public DataTable dtRowsCount; Thread t1; ThreadStart ts1; void ExcelToSql() { ...

C# What would happen to GC if I run process with priority = RealTime?

I have a C# app which runs with priority RealTime. It was all fine until I made few hectic changes in past 2 days. Now it runs out of memory in few hours. I am trying to find whether it is a memory leak I created of this is because I consume lot more objects than before and GC simply cant collect them because it runs with same priority....

How to spin an independent dispacher thread for a Silverlight UserControl

I am trying to move a lot of different elements by 1 pixel very often and in parallel. Trying to do this on one dispatcher thread means that the elements are visited one after another. The result is that the more elements I have the slower they will all move. In WPF I was able to use a HostVisual as described here to solve this. I can'...

What happens with this thread after the method finishes?

In my ASP.NET application, a while down the stack I call the following code: Public Shared Sub Larma(ByVal personId As Integer) Dim thread As New System.Threading.Thread(New ParametrizedThreadStart(AddressOf Larma_Thread)) thread.Start(personId) End Sub Private Shared Sub Larma_Thread(ByVal personId As Integer) StartaLarm(p...

CreateThread() fails on 64 bit Windows, works on 32 bit Windows. Why?

Operating System: Windows XP 64 bit, SP2. I have an unusual problem. I am porting some code from 32 bit to 64 bit. The 32 bit code works just fine. But when I call CreateThread() for the 64 bit version the call fails. I have three places where this fails. 2 call CreateThread(). 1 calls beginthreadex() which calls CreateThread(). All th...

Make a heavy page run asynchronously in ASP.NET

Hey, I've created a heavy page that is meant for the site operators. The page takes about 3 minutes to complete, and if we will implement it in production it will get timed out. I don't want to increase the timeout limit of the site or the page itself. I want to make it asynchronously. Note however that the page returns results, theref...

Identity.Name is disposed in a IIS7 Asp.NET MVC application Thread

I have made the smallest demo project to illustrate my problem. You can download the sources Here Visual Studio 2008, .NET 3.5, IIS7, Windows 7 Ultimate 32 bits. The IIS Website is configured ONLY for Windows Authentication in an Integreated pipeline app pool (DefaultAppPool). Here's the problem. I have an Asp.NET MVC 2 application. In...

stop thread that does not get interrupted

I have a thread that sits and reads objects off of an ObjectInputStream: public void run() { try { ois = new ObjectInputStream(clientSocket.getInputStream()); Object o; while ((o = ois.readObject()) != null) { //do something with object } } catch (Exception ex) { //Log excepti...

Why doesn't Flex support threads?

Why doesn't Flex/ActionScript currently support threading? ...