Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged multithreading

0 votes
1.2k views
1 answer
    I have the following class: class A { private: int starter() { //TO_DO: pthread_create() } void* threadStartRoutine( void *pThis ); } I want to create ... am compiling my program on Linux-x64 using G++. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I got JavaFX main thread, there I create new Thread that extends Task and sort and replace bars. Everyhing is good, but I want to make some delays(like 100ms) while ... j]; array_tmp[j] = temp; } } } } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
937 views
1 answer
    I would like to pass my for loop's index into the pthread_create's argument through a wrapper object. However, the printed integer from the thread is incorrect. I ... (&thread[i], NULL, &run, &arg); } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I can run this code fn testf(host: &str) {} fn start(host: &str) { testf(host); testf(host); } but for some reason, I can't run this one: fn ... explain me, what is wrong with it and how to fix it? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    is there anyway to kill a thread or interrupt it immediately. Like in one of my thread, i call a method which takes time to execute (2-4 seconds). This ... to stop right then. Is there anyway to do this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
818 views
1 answer
    Lets say I have a simple class like the following: @interface A { // @public int var; } // @property(some_property) int var; @end When I want to access ... doing it however I want so long as it works? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
899 views
1 answer
    This question has an answer that says: Hyper-threading duplicates internal resources to reduce context switch time. Resources can be: Registers, arithmetic ... possibilities (transistor size, etc.)? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I try to run the example from a book(Paul Hyde, Java Thread Programming). It says that the order of threads will interchange. But I always get : 10 "Main ... ) { System.out.println("Main thread"); } } } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Is it possible to have two variables incremented atomically. I have the following code and since it's a multi-processor, multi-threaded environment, cache ... structure? P.S: I cannot use locks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Regarding the following SO answer . I've made some changes in order to understand the difference between do use Contextvars and don't. I expect at ... to see an unexpected behaviour of the variable myid? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I am redirecting the output of a process into a streamreader which I read later. My problem is I am using multiple threads which SHOULD have separate ... line where I did: reader = proc.StandardOutput; See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I have an async chain in my java code that i want to stop after a certain timeout so i created a threadPool with some threads and called the ... ) i still feel that the thread pool is exhausted See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Does the presence of python GIL imply that in python multi threading the same operation is not so different from repeating it in a single thread?. For example ... me. Can someone help me on this?. Thanks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
920 views
1 answer
    If multiple cores are available on a given processor, will they be utilized automatically when JVM runs a java code written by user? Or the code will have to be ... be the case -- but I am not sure. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
890 views
1 answer
    I want to do some calculation in a separate thread, and then recover the data from the main thread. What are the canonical ways to pass some data from a ... the other thread? handle.join().unwrap(); } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Does anyone know if there is a way to dynamically (runtime) increase the stack size of the main Thread? Also, and I believe it is the same question ... stack size related options beside Xss) ? Thanks ! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.0k views
1 answer
    I'm writing a script to access a website using proxies with multiple threads but now I'm stuck in multiple threads, when I run the script below, it ... (Wish everyone has a happy and lucky new year) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Suppose I have two threads A and B that are both incrementing a ~global~ variable "count". Each thread runs a for loop like this one: for(int i=0 ... these two instructions? Not sure. What do you think? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I am trying to write a simplest multithreaded TCP server in C#, which receives the data from multiple clients. Every time a new client is connected, the socket connection ... count : 0, from IP : 10.0.0.2 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Is there anyway to use std::thread with C++11 standard library in windows when compiling with g++ 4.5.2 in MinGW? I'm going assume no as I've ... with the pthreads option but I figure I'd ask anyway. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    what is the best method for inter process communication in a multithreaded java app. It should be performant (so no JMS please) easy to implement and ... bound to one thread only? Any ideas welcome! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
923 views
1 answer
    I'm trying to make a for loop multi-threaded in C++ so that the calculation gets divided to the multiple threads. Yet it contains data that ... . The vertex index should be consistent and rebuildable. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I have a infinite loop like the following one, and within this loop, I want to continuously check the keyboard to see if the escape key (ESC) has been ... { //do something //check for the ESC key } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
881 views
1 answer
    I'm preparing a college exam in parallel computing. The main purpose is to speedup as much as possible a Montecarlo simulation about electron drift in earth ... this. What's your suggestion? Have fun gf See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
900 views
1 answer
    Is it possible to call multiple functions at the same time? E.g. var executed = false; // loop 1 func(); // loop 2 func(); function func(){ if ( ... alert(1); } Can func() be executed 2 times at once? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I am writing a progam which downloads games from a website as zip archives and extracts them. Since all games are downloaded to the same location before ... is my use of async/await causing the issue? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I'm coding a radio in java and am using a thread to of course play the stream in. I have a while loop in the run method of the thread which checks if a ... that's the case I don't know what I should do! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I have a method (can be concurrently called by different threads) that creates an asynchronous task and returns a CompletableFuture. I want to ... gets executed asynchronously by a different thread? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...