Unblocking System.in in a multi-threaded app
I am writing a multi-threaded application. One thread in particular is
waiting for input from the server console using System.in. In some
cases one of the other threads may encounter an error condition and
force the shutdown of the system. All threads terminate correctly
except for my Console input thread. This thread continues to run as it
is still waiting for input from the console. How do I unblock this
thread without input from the console? Code follows.
BufferedReader serverInput = new BufferedReader(new
String inputLine = ""...Tcl threads in Multi-CPU systems
I have read previous posts but it is still unclear :
Can Tcl threads be dispatched to different CPU in a multi-CPU computer?
Here is why I'm asking the question :
I have built a Tcl application that interpolates 3Dimensionnal data.
The application is build in the following manner :
- An extension written in C has the code to perform the interpolation
and do the IO. The library is thread safe. It has been tested with
multi-threaded C programs.
- A Tcl interface to that library ( The interpolation extension )
provides acces to the interpolation and IO functions via Tcl commands.
The d...System Calls Hang in Multi-Threaded Webcrawler
I'm writing a multi-threaded web crawler designed to periodically
archive all the documents on my University's web server. The crawler
is written in C++ on a system running Ubuntu 6, and uses standard
POSIX threads (pthreads).
When I run a certain number of threads concurrently, (usually around
30), a handful of threads will hang indefinitely on system calls, such
as recv(), or sleep(). I tried numerous methods to handle this
problem. I use non-blocking sockets, and even created a background
thread monitor which tracks threads, so that hanging threads can be
identified. ...measure consumed time in multi-thread system
I got a muti-threaded system, and I want to measure the whole used to
tranverse the system, I mean packet processing actually.
As it's a multi-threaded system, if I output the time difference
between leaving and entering system to output:
1. whether the output operation will consume a lot of time itself?
2. whether multiple threads will cause race conditions to the output
How to solve them? Thanks.
I recommend you store the time metrics in thread-specific
storage (e.g., via ACE_TSS), which will eliminate locking overhead.
You could store the met...Scaleable multi-threaded allocator solutions for embedded systems with NO heap...
You can create a single threaded allocator (e.g., try to do so without using
any static's)... In other words, the invention needs to be able to "create"
an allocator on a strictly per-thread/cpu basis. So, I need an explicit
constructor function-pointer to "your" extern "C" declared
method/static-func in order to render a viable pointer for my library to
cache "and" use.
I need function pointer to your single-threaded static variable free "heap"
object constructor. After that, the rendered impl, (e.g., rendered wrt our
discussions o...Using the system command to launch a multi-threaded PC executable
I have a Windows executable file that runs stochastic simulations as separate threads and then averages the results together at the end.
I would like to run the simulations from MATLAB using the system command. Everything works fine if I run the 4-threaded version of the executable but the executable returns early (without reporting an error) if I try to run 5 or more threads.
I suspect that this is because my Windows 7 machine has 4 cores and maxNumCompThreads (see http://www.mathworks.com/help/techdoc/ref/maxnumcompthreads.html) is therefore equal to 4.
Is there a way of successfully laun...call of system(const char*) crashes in multi-thread-application
(Linux 2.4.10, pthread library)
I have the problem, that any call of the ansi c function "system", which
should execute a program, crashes my multithreaded application (It just
hangs or exits the application without any error message). If I call
"system(const char*)" just before creation of the threads (5 to 10),
everything works fine. It does not matter, what I call (script, invalid
Is there a problem with multiple threads?
"Ernst Murnleitner" <firstname.lastname@example.org> wrote ...Hyperthreading & multi-threaded driver causes system crash!
I am working on a multi-threaded NDIS WDM driver. It runs fine on a
Dual Xeon based system (with both processors enabled) and has passed
an entire suite of tests.
But when Hyperthreading is enabled (even with the second processor
disabled), the system hangs.
The problem is - I can't even break in with the debugger (SoftICE -
DriverStudio 3.0) at this point - have to cold boot the system.
Are there any special considerations for supporting Hyperthreading in
No issues. Hyperthreading is the same as SMP in software, and any driver mu...Change Multi threaded DLL to Multi threaded
If I redistribute an app which is built with the "Multi threaded DLL"
option (windows), can I be sure that the user has all the necessary
run-time DLL files on his/her computer?
I want to build the calendar sample as a Multi threaded instead of Multi
threaded DLL, to get rid of run-time dll depencies.
When I change the code generation setting in MS Visual C++ 2008 Express
Ddition to Multi threaded, I get lots of link errors, for example:
Error 1 error LNK2005: _free already defined in
Error 2 error LNK2005...