Hi all,
What is the behavior of cx_Oracle cursors when the connection object is used by different threads? How would generators affect this behavior? Specifically...
Edit: The original example function was incorrect; a generator was being returned by a sub function, yield wasn't used directly in the loop. This clarifies when finally...
I have two threads in my app - the main UI thread and another thread initiated by the wm_WiiMoteChanged event handler (a background thread). In the main thread I do some video processing. I have a function called processFrame shown below. I use that code to measure the time to process each frame and thus the frames per second rate.
If I...
Is there a possibility in .NET to bind an object instance to a current execution context of a thread?
So that in any part of the code I could do something like CurrentThread.MyObjectData.DoOperation() and be sure that I access thread-specific data?
thanks!
...
Hi everyone.
I am programming a game using pygame. I intend to control one of the characters using OpenSoundControl (OSC), a udp-based protocol for realtime communication. Basically I am using simpleOSC module to biund some OSC commands to functions on my pygame program.
My game structure is something like this (this is a simplificatio...
I am working on multhithreading application when ever the process dump it always generates core as shown below i am not able to understand where it is actually dumping.
GNU gdb Red Hat Linux (6.5-25.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welco...
I'm currently trying to reproduce a bug that I think is caused by thread synchronization error.
Sadly the bug does only occurred on the customer site but not on my development machine.
Since those threads involve HDD access that is extremely slow at the customer site (about 1 MB/s) I think that the reason why I can't reproduce the bug ...
Hello,
I have a multithreaded application that has many concurrent operations going on at once. When each thread is finished it calls one of two methods on the main thread
performSelectorOnMainThread:@selector(operationDidFinish:)
// and
performSelectorOnMainThread:@selector(operationDidFail:withMessage:)
When an operation fails, I l...
If you have some blocks of code that you would like to prevent execution of when the object is being exited and cleaned up, could a lock be used to prevent the execution?
Monitor.TryEnter(cleanupLock, ref acquiredLock);
TryEnter could be used to ensure that the code is not executed, and since it does not wait for the lock there will n...
I have an NSDocument-based Cocoa app and I have a couple of secondary threads that I need to terminate gracefully (wait for them to run through the current loop) when the users closes the document window or when the application quits. I'm using canCloseDocumentWithDelegate to send a flag to the threads when the document is closing and th...
Hello, I have problem creating JTable, which will show every second some text.
I make MainView, place JTable and have Class "TableHandler(JTable table) implements Runnable" which is supposed to add some text in intervals to JTable ...
Here is run method :
public void run() {
for (int i=0; i<5; i++) {
table.setValueAt("text",...
I have a decoder that acts as a producer and places decoded video frames at a shared memory buffer. I have consumer processes that each runs on a separate thread, reads a frame and processes it. I would like to implement a dispatcher process thread that
Checks the shared memory buffer and sends teh next unread frame to a selected consu...
I have a Java Thread like the following:
public class MyThread extends Thread {
MyService service;
String id;
public MyThread(String id) {
this.id = node;
}
public void run() {
User user = service.getUser(id)
}
}
I have about 300 ids, and every couple of se...
I'm trying to write a ThreadManager for my C# application. I create several threads:
One thread for my text writer.
One thread that monitors some statistics.
Multiple threads to perform a large sequence of calculations (up to 4 threads per core and I run my app on a 2x quad core server).
My application normally runs for up to 24 hours ...
I have a very simple queue implementation that wraps a fixed array. It contains peek, enqueue, and dequeue. If peek returns a reference, I've found that it will return conflicting results eventually (conflicting results meaning it will return 2 different values without any intervening dequeues or enqueues). Obviously, this could happen i...
Would it not be nice to be able to start a thread like this.
Sub DoStuff()
Using MyThead = New Threading.Thread()
'Do stuff on MyThread.
End Using
End Sub
It is much less code to write and looks nicer than:
Sub DoStuff()
Dim MyThread As New Threading.Thread(AddressOf DoStuffThread)
MyThread.Start()
End Sub
Sub...
Here is what I need to do.
-I receive log data through a udp connection
-I stack relevant data in a qlist
-I have a timer running in the main thread that, on timeout, unstacks this data, updates some arrays then calls widget->update
-The widget re-implements paintEvent and uses these arrays to draw charts.
What would be the best way ...
Is it possible that a program which does not kill its threads properly before exiting still be running some piece of code somewhere even though it has been killed in system monitor? I am running ubuntu in a non virtual environment. My application is made with QT, it contains QThreads, a main thread and concurent functions.
...
I would like the have the following Blocking Condition Variable
Once the blocking condition variable had been signaled, all threads will not wait on the particular condition variable
The condition variable can be unsignaled anytime.
Once condition variable had been unsignaled, all threads will be waiting on the variable
I look at ht...
Im using a web service, so I want to use an async thread for the HTTP authentication request and another thread later to make additional service requests while my main thread runs.
Would like to see a good example of how to do this and how to show busy messages somehow in main app. How does the main app know when the thread finished? An...
Now from what I understand under Perl ithreads all data is private unless explicitly shared.
I want to write a function which stores per thread state between calls. I assume that a side effect of all data being thread private by default would allow me to use a closure like this:
#!/usr/bin/perl -w
use strict;
use threads;
{ # closur...