multithreading

File processing in java

I have a file of size 2GB which has student records in it. I need to find students based on certain attributes in each record and create a new file with results. The order of the filtered students should be same as in the original file. What's the efficient & fastest way of doing this using Java IO API and threads without having memory ...

how to pause and resume a surfaceView thread.

I have a surfaceView setup and running, but when i resume it i get an error that the thread has already been started. Whats the proper way to handle when the app goes to the background and then back to the foreground? Ive tinkered around and managed to get the app to come back without crashing...but the surfaceView doesnt draw anthing an...

sizeWithFont in MultiThread Crash!

sizeWithFont crashed in multithread,this is the debug info: 1 0x00a0df8e in icu::RuleBasedBreakIterator::handleNext 2 0x00a0daff in icu::RuleBasedBreakIterator::next 3 0x00a0d174 in icu::RuleBasedBreakIterator::following 4 0x35879719 in WebCore::nextBreakablePosition 5 0x3587842a in -[NSString(WebStringDrawing) _web_drawInRect:withFont:...

How to find the entry point of a specific thread in Windows?

I'm trying to figure out how to find the entry point of a specific thread in Windows. I know of various ways to get the entry point of a process, but not of a thread. I've looked at a few different structures/methods (TIB, PEB, and GetThreadContext) that might be able to access it, but it doesn't seem that they do. I've also checked out ...

Can some one Explain Mutex and How that is used

I read few documents about Mutex and the only Idea I have got still is This helps preventing threads from accessing a resource that is already being used by another resource. I got from Code snippet and executed Which Works fine: #include <windows.h> #include <process.h> #include <iostream> using namespace std; BOOL FunctionToWriteT...

C# How to run and handle form in another thread?

Here's my problem: I'm making a product upload module (main form) in C#. I read data from excell files, then upload into database, then I'm resizeing the images and uploading via FTP. Everything works fine. Now I want to add a progress bar. I've made a new form, I've add two progress bars, and made public methods for giving new value to ...

recurring appointment system-Design Guidance

Hi, We got a scenario where user can create recurring tasks. The recurring task can be of any type, like periodically send reports to this customer on 1st of everymonth, process invoice on every Monday. All these tasks are application specific(not user specific) and can be seen my other users as well. To cater this need, we are creating ...

NUnit secondary thread exception

I'm testing the code which starts a secondary thread. And this thread sometimes throws an exception. I'd like to write a test which fails if that exception isn't handled properly. I've prepared that test, and what I'm seeing in NUnit is: LegacyImportWrapperTests.Import_ExceptionInImport_Ok : PassedSystem.ArgumentException: aaaaaaaaaa a...

Pause bindings for entire window?

Is there any way to pause all of the bindings on a window, or pause all bindings in the entire program at runtime? I have a class called Page, it contains a lot of variables that my controls bind to in order to update and be updated by the class. I have a load function that loads an XML file and creates a Page class from it. The problem...

Load 3 user controls (web application) on their own threads

I have 3 user controls that pull data from the database and display a gridview. I need all of these 3 gridviews to run at the same time. How can I use threading to accomplish this? I forgot to mention it is being developed in C# Also, trying to create a thread in the page that is calling the 3 user controls is shutting down my localh...

Multi processing subprocess

i am new to subprocess module of python, currently my implementation is not multi processed. import subprocess,shlex def forcedParsing(fname): cmd = 'strings "%s"' % (fname) #print cmd args= shlex.split(cmd) try: sp = subprocess.Popen( args, shell = False, stdout = subprocess.PIPE, stderr...

There is a rule to find out which objects could possibly have concurrent access in a Java program?

There is a rule to find out, for sure, all objects that could possibly have concurrent access in a Java program? My intention is use such rule, if it exists, to find out which Java classes could possibly have concurrent access and then guarantee that they are thread-safe. This rule could be very useful when inspecting a large Java projec...

A Single .NET Event Subscriber Associated with Multiple Event Publishers & Multithreading

Hello, Supposing I have a single class, containing a simple method. Let's say that there is a delegate with the same signature as this method. I want to run multiple long-running processes, each one launched from this class. Each process contains an event, which is composed of multicast delegates of the same type as the delegate mentio...

Standard way of handling errors originating from threads

This question has been brought up many times, but I'd like to ask it again because I've read some things here that didn't seem right to me (could be because one is related to the .NET CF), and I am asking for validation of a specific approach that I think is reasonable, and would appreciate any feedback you might have. Anyhow, the situa...

Java thread blocking

Hi, i have a problem with my java environement. I'm running Solr 1.3 (search engine) since more then a year now and suddenly i got alot of trouble with it. All my thread pool (250) got randomly blocked once or twice a day. I did not make any change on my solr application or my tomcat server. I'm running tomcat 5.5.25 and Solr 1.3. I ...

C# Efficiently Dividing Tasks Between Cores

I'm working on a small simulation that is running on my 8-core workstation. The simulation involves modeling the interactions between a large number of independent nodes. During one phase I need to perform a series of simple atomic operations to each node in parallel. I have been using Parallel.ForEach from System.Threading.Tasks to a...

multiple realtime graphics forms in own threads, global 60fps limit?

I'm using XNA and creating a bunch of forms that roll their own 'game loop' to handle drawing and such. Each new form is opened on its own thread, with a subsequent Application.Run(form) to make the thread handle the messages for that form. When I started I noticed that despite me not implementing any kind of frame limiting timing, the...

C# Express 2010 Multi-Threading

Hi, I have a windows app that I have been running in c# Express 2008 for a year and have been trying to convert it over the last few days to 2010. The problem I am having is it is a multi-threaded application that has to run a series of code every second. What it does is have a main thread, that calls 3 worker threads, waits for them to...

How do I check a property value of the Main Thread from a Worker Thread?

I have some asynchronous operations being performed on the main thread of my application. I need a worker thread to poll the main thread periodically and check a value on the main thread. How can I do this? Can I raise an event on the worker thread that the main thread is listening to? Bidirectional communication. Thanks.. ...

How do I suspend all threads after my program crashes?

I have an unhandled exception handler. It shows a nice GUI and allows users to send an error report. Users can even leave their name and phone number and things, and our support department calls them back. Works well, looks good, makes customers less angry. In theory, anyway. The problem is that my application uses background threads, a...