I need to iterate over the vertices and edges of a BGL adjacency_list from several threads.
Which would be an efficient way to do that, provided that the graph is large (mutex..)?
The BGL methods don't support reentrant calls?
...
I have a c# console application which has some threads to do some work (download a file).
each thread may exit the application at any time any where in application, but I'll show a proper message on console. It's possible to track them but it doesn't make sense to me. I want simply check thread count or something like that to find out wh...
I am trying to Tune a thread which does the following:
A thread pool with just 1 thread [CorePoolSize =0, maxPoolSize = 1]
The Queue used is a ArrayBlockingQueue:
http://download.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html#poll%28long,%20java.util.concurrent.TimeUnit%29
Quesize = 20
BackGround:
The thread tr...
Main execution path (main thread) is going to be forked into two execution paths (two new threads on different jobs) but the main thread is no longer needed. I can assign one of the tasks to main thread and save one thread (one task by main thread and another by a new thread) but I was wondering putting main thread in an infinite sleep T...
Thread t = new Thread (WriteY);
t.Start();
for (int i = 0; i < 1000; i++) Console.Write ("x");
static void WriteY()
{
for (int i = 0; i < 1000; i++) Console.Write ("y");
}
internally How does thread work ? means why output of above code is not fix every time i run, sequence of 'x' and 'y' is different?
...
When a thread starts, who decides the status of thread; whether it is alive or dead?
...
Hi,
I am generating the thumbnails of various image file, now I want to optimize it using thread or queue. so when I select a folder it generate thumb image one by one like in windows search.
I am new to C#, please help me on this.
Thanks,
Tanmoy
...
Hi,
I have written a code to save the image which is generated by the application. The size of image is around 32-35 MB. While saving the image to a bmb file, it is taking long time around 3-5 secs. For the purpose, I have used background worker but when running background worker, it shows an error like..."cant access the object as it i...
Currently I'm writing a little webserver and I create a new Thread for every request the server gets.
Basically it's like this:
public class MyController
{
public void ProcessRequest(object contextObject)
{
HttpListenerContext context = (HttpListenerContext)contextObject;
// handle request
if (someCondition()...
I'm using celery with django and am trying to get a Task, like the one below:
class task1 (Task)
def run (self):
launch_some_other_task.delay()
But it doesn't seem to be working, I can go into more detail as far as my code but figured I would just ask first if this sort of thing will work as doesn't seem to be working for me....
I need to "send" a piece of code from another thread (Excel Interop) to the UI thread to execute. Normally you'd use Invoke on the Form, which implements the ISynchronizeInvoke interface:
public class MyForm : Form
{
...
private void Button_Click(object sender, EventArgs e)
{
SomeExcelWorkbook.OnBeforeClose += delega...
I want to run some code from an ASP.NET MVC controller action in a new thread/asynchronously. I don't care about the response, I want to fire and forget and return the user a view while the async method runs in the background. I thought the BackgroundWorker class was appropriate for this?
public ActionResult MyAction()
{
var backgro...
There are huge numbers of threads running in parallel continuously (let's assume this continuous part)). All the threads want to log some application data, basically a set of values.
What would be the best approach to log this data? single/multiple file?
What would be the best approach to make backup of this log?
What would be the appr...
Hi
I make a tool and provide an API for external world, but I am not sure whether it is thread safe. Because users may want t use it in multiple-thread environment. Is there any way or tool that I can use to verify whether my API is thread safe in Java?
...
I have 2 thread groups in my test case. Group A should complete first before Group B starts to execute(at least I though this was the way it worked).
Unfortunately they are firing at the same time and tests from both tread groups are executing, what can I do to prevent this from happening. Not to allow group B to start before group A i...
I am writing a little trial project and I need to pass and object of type QueuList by value to a thread pool thread. It is a Boost threadpool and I am using Bind to pass the args to the thread.
For some reason I cannot seem to pass my item to the threadpool thread by value...
Can anybody help what I'm doing wrong?
void ConsumerSchedu...
Hi,
i want my application to wait indefinitely till a task gets completed in another thread.
How to perform this in Qt.
in windows we use waitforsingletonobject but is there any alternative to this. can i get some hints from you guys..
Thanks
...
Hello.
When you create a TThread descendant using the tool palette in your BDS, you can provide a name for the thread. Here's the auto-generated code. You just call the SetName() function in the Execute method and the thread calling this method is given a name in a kind of weird way...
{$IFDEF MSWINDOWS}
type
TThreadNameInfo = record...
Hi Experts,
I wish to know whether a user is scrolling the DataGridView.
While the user is scrolling the DataGridView I wish to suspend a running thread and resume this thread as soon as the user stops scrolling.
Any help will be deeply appreciated from heart.
Thanks a lot :)
Update :
For my work regarding this,code is here :-
http...
Hi,
I am required to have multiple threads writing to a single buffer (contiguous chunk of memory). The brute force method will be as follow
The thread that wants to write to buffer will acquire lock on the buffer
Entire buffer is locked and therefore only the thread that acquired lock can modify the buffer.
The thread write to buffer...