190 Topics
| |
Hi Everyone 👋🏼, I'm in a bit of a pickle, hopefully someone can provide some guidance. I have stale Firebase notification tokens in a database for an existing Xamarin application, initially (years back) the application never contained logic to refresh notification tokens. With the most recent update to the application … | |
## Introduction ## When working with WorkManager, it is important to know how to provide input data to your Workers. In this tutorial, we will learn how to provide basic input data to a Worker as well as when Workers are chained together. ## Goals ## At the end of … | |
## Introduction ## Whenever we want to modify numbers from multiple threads running concurrently, such as modifying a counter, one of the best options is to use the AtomicX classes. The most basic numeric atomic classes are AtomicInteger and AtomicLong. In this tutorial, we will learn how to use the … | |
## Introduction ## With coroutines in Kotlin, we are able to execute suspending functions without blocking the current thread. By default, most coroutine builder functions use the `Dispatchers.Default` context, but it is also possible to use other implementations of `CoroutineContext`. In this tutorial, we will learn about the 2 `CoroutineDispatchers`: … | |
## Introduction ## This tutorial introduces the `CyclicBarrier` class and teaches you how to use it. ## Goals ## At the end of this tutorial, you would have learned: 1. How to use `CyclicBarrier` to synchronize tasks across multiple threads. ## Prerequisite Knowledge ## 1. Intermediate Java. 2. Basic knowledge … | |
Hello everyone, I have a problem with my app when closing the gui-UI, that is developed in PyQt5. In my app I have 3 discrete threads and one of it using slot-signals for communicating with the gui. The problem I have is that when I close the gui, and the … | |
Hi everyone, I am working on an app and trying to create a corrector and I am using keyboard module for the correction. I have created a class, which reads pressed events and displays them to screen, and its action are dependent to a variable passed to the constructor. If … | |
Hi all, So before I went and posted ~800 lines of code, I have 2 questions: 1: What is the preferred way for us to post "complex" C++ (of course, this is just a .h, .cpp, and main cpp but it's still a lot of lines) that wont just be … | |
Hello. As from the topic title, i am trying to work a multithread GUI where the progress bar indicates the running process completion (like we always see when we are installing/uninstalling/downloading). I've read a couple of written tutorials and some other forums discussions regarding the progress bar and multithreading. I've … | |
I am trying to learn Volatile keyword in Multi Threading and I came across this statement: *Volatile is preferred in cases when one thread reads and writes a shared variable and other threads just read the same. Whereas if there are more than 2 threads performing read and write both … | |
I am trying to understand the SynchronizedMap and I ran the below code. I get the below Output with an exception. According to my understanding the exception is caused when the get() methods are trying to access the syncmap when a thread is still executing a write on the map … | |
0 down vote favorite I have created a network scanner, that looks for a specific port on a range of IP's. I would like to thread the application but I am getting and error message ERROR: for worker in range(network.hosts): TypeError: 'method' object cannot be interpreted as an integer Now … | |
I have two forms the first FrmRecipe.vb form has all my calulations and functions in it the second FrmReports has a crystal report viewer with loads of reports. I am trying to call the report as a thread so that the main from is still working however when the treads … | |
Hi Im trying to Populate my datagridview from data scraped off of webpage i Want to be able to report progress when datagrid finished updating.. with a progressbar.. Please Help!!!!!! Thank You.. Heres My code Dim theElementCollection As Windows.Forms.HtmlElementCollection theElementCollection = Form1.WebBrowser2.Document.GetElementsByTagName("a") For Each curElement As HtmlElement In theElementCollection Form1.DataGridView1.Rows.Add(curElement.GetAttribute("title"), … | |
Hi, I got multiple threads in different classes created in this manner: private ThreadStart someName_TS; public Thread someName_Thread; public void someName() { someName_TS = new ThreadStart(someNameThread); someName_Thread = new Thread(someName_TS); someName_Thread.Start();} } private void someNameThread() { while(!Shutdown) { //Do heavy work } } The heavy work is set to a … | |
Hi Dw. I'm deeply in need of your help, I'm having a problem that is giving me a very serious problem with my code. My program is a multithreaded program and its a TCP/IP based application. Client has no problem, only a server that is being so weid to me … | |
Hey, I have been reading Java oracle tutorials. I read this thing. Suppose, for example, class MsLunch has two instance fields, c1 and c2, that are never used together. All updates of these fields must be synchronized, but there's no reason to prevent an update of c1 from being interleaved … | |
Hi Dw. I am developing a client server multi-thread application. This application uses signals(certain messages as signals), in order to perform a task for a client. For instance if a client wants to login, the client send a message as: `Login:<username>:<password>` and on a server I first check if the … | |
Hi everyone this is my first code snippet so be gentle.. I have written a basic client/server chat program that uses multithreading for listening and sending. I welcome any improvements or discussion... Thanks James | |
| So it seems google's go is changing the programming landscape, well there probably were other languages out there before but the google-sphere seems to deliver more clout, people take notice. Google Go appears to have done anyway with classical OOP, especially inheritence, although it can be realised via other ways. … |
Hello, Please tell me how to implement multi threading in C++ on Ubuntu 10.10. The compiler I use is GNU 4.5.2. I have some knowledge of multi-threading in Java. Explain with some codes if possible. Or please give the URL of any useful stuff | |
I'm using Excel interop and it seems that this functionality needs to run in the User Interface thread. So I execute that from the ProgressChanged backgroundworker event. Is there a way to have the dowork event (that invoked the progress changed event) interrupt execution until the ProgressChanged event is finished? … | |
I'm trying to add a progress bar to a working theaded program that uses a cancelation token too. The structure of the program is: I have a button "BeginButton" that calls the function "MyFunction()". The function runs in another thread and a cancellation token listens if I press a Cancel … | |
I have a Windows Forms application (not WPF) in which from the main form (UI thread) I am creating a separate thread to perform a long period of test execution. The idea is that the user starts the testing by clicking a button on the main form; when the user … | |
i write a program its output is below G:\Java\Multithreading>java NewThread Child Thread Thread[main,5,main] Main Thread 1 Child Thread 1 Main Thread 2 Main Thread 3 Main Thread 4 Main Thread 5 Main Thread Complete Child Thread 2 Child Thread 3 Child Thread 4 Child Thread 5 Child Thread Complete in … | |
Alright so I am getting a weird problem with the following code int toDB[2]; int fromDB[2]; char * param1; char * param2; err = pipe(toDB); if(err==-1) { printf("Error on pipe creation: %d\n", errno); exit(1); } sprintf(param1, "%d", toDB[0]); err = pipe(fromDB); if(err==-1) { printf("Error on pipe creation: %d\n", errno); exit(1); … | |
Run two calls to a function simultaneously with this threading @background decorator. | |
How do I use pipes to communicate with another proccess that is being run using an execl command? I know how I can send info to that process but how do I get info back from that proccess? Some more information on what Im trying to do: I am trying … | |
when we create a thread like this class Run implements Runnable{ public void run(){ //You code } } class Helloworld{ public static void main(String args[]){ Thread t1=new Thread(new Run()); Thread t2=new Thread(new Run()); } } in above code thread t1 and thread t2 is creating in `main()` method its mean … | |
Hello all, My question is hopefully particular enough to not relate to any of the other ones that I've read. I'm wanting to use subprocess and multiprocessing to spawn a bunch of jobs serially and return the return code to me. The problem is that I don't want to wait() … |
The End.