Category "multithreading"

How to start tasks after cancelling

I have a Windows form with three buttons. One button adds entries to a BlockingCollection. One starts processing the list and one stops processing the list. I

How to close a thread when multithreading? [duplicate]

To simplify the situation I'm having: I'm trying to terminate a thread while it is still running in Python 2.7, and I'm not sure how to do it.

Guid.NewGuid() is returning duplicate values when used in a Parallel.For loop

I have an application that is hitting an API. As such, it does a query for all ID's in the object, and then has to query each item one at a time per ID. I'm d

Why can an Object member variable not be both final and volatile in Java?

If in a class I have a ConcurrentHashMap instance that will be modified and read by multiple threads I might define like this: public class My Class { pri

How to check if a std::thread is still running?

How can I check if a std::thread is still running (in a platform independent way)? It lacks a timed_join() method and joinable() is not meant for that. I thoug

Does async programming mean multi-threading?

lets talk about JavaScript code which has setInterval methods every 2 sec. I also have a onblur animation event for some control. In a case where onblur occurs

Jmeter - All threads other than current thread wait

I am new to Jmeter and I have been struggling with my test plan. Test plan steps: Enters the site Creates multiple wish lists (like the wish list on amazon) I

Jmeter - All threads other than current thread wait

I am new to Jmeter and I have been struggling with my test plan. Test plan steps: Enters the site Creates multiple wish lists (like the wish list on amazon) I

Sleeping barber using semaphore

I am having a problem in the synchronisation of threads. I m trying to implement sleeping barber problem in a different approach. When i run the code the thread

Monitor.TryEnter doesn't work

Part of my code-behind: object _sync = new object(); private async void OnKeyDown(object sender, KeyEventArgs e) { if (!Monitor.TryEnter(_sync)) return;

Is there any method to abort cin or scanf

I have a multithreaded program in which on thread waits for input through a terminal and the other will get data from the socket. Is there any way to abort firs

Running two threads at the same time

I want to know if a program can run two threads at the same time (that is basically what it is used for correct?). But if I were to do a system call in one func

Infinite While True Loop in the Background (Python)

basically, I have some code like this: while True: number = int(len(oilrigs)) * 49 number += money time.sleep(1) In front of this I have a start up

How to queue a completion port action (I/O bound function) to CLR ThreadPool

I have an external library that does long running I/O. I wish to create a multithreaded application that will use ThreadPool to limit simultaneous number of thr

.NET thread-safe cached result

I have something like the following in C#: private double _x; private bool _xCalculated; private double GetX() { if (!_xCalculated) { _x = ... //

Can a thread call SuspendThread passing its own thread ID?

Can a Windows thread suspend itself with SuspendThread()? I can awake it from another one but, can it call SuspendThread(GetCurrentThreadId())?

Is a Go goroutine a coroutine?

In the Google I/O 2012 presentation Go Concurrency Patterns, Rob Pike mentions that several goroutines can live in one thread. Does this imply that they are imp

Can Powershell Run Commands in Parallel?

I have a powershell script to do some batch processing on a bunch of images and I'd like to do some parallel processing. Powershell seems to have some backgrou