Questions tagged [single-threaded]

Single threaded as opposed to multithreading defines a code section, object or application that can run only using and allowing a single thread.

Single threaded as opposed to multithreading defines a code section, object or application that can run only using and allowing a single thread.

References

209 questions
0
votes
1 answer

GWT single threaded callbacks

positionService.call(new PositionCallback(){ onPositionUpdate(Position position) { this.position=position; if (isLoaded){ refreshDataWithPosition(); } }); dataService.call(new DataCallback(){ onDataUpdate(Data data) { //does this…
DD.
  • 21,498
  • 52
  • 157
  • 246
-1
votes
2 answers

Rust: Safe single-threaded TCP Server

is it possible in pure rust to write a single-threaded TCP Server? In C I would use the select syscall to "listen" to multiple sockets. I only find solutions where people use unsafe to use epoll/select, but I really want to avoid this. I think this…
Alai
  • 123
  • 1
  • 8
-1
votes
1 answer

Why NodeJs cannot process intensive CPU tasks even if it is running async?

What I don't understand is, nodejs is asynchronous so I run multiple tasks doesn't matter how long they take, because the code parser continue to the other tasks and when the long task is completed it will let me know with a callback function, so…
-1
votes
1 answer

Behaviour of beast boost Async http client in single threaded asynchronous system when multiple simultaneous requests are sent

How does beast boost async http client works in c++11 when multiple simultaneous requests are made in a single threaded asynchronous system? USE CASE: I want to send multiple simultaneous asynchronous requests and I am creating new http client for…
nishu jain
  • 11
  • 1
  • 5
-1
votes
1 answer

Asynchronous methods on single-threaded machine

Anatomy of a Program in Memory states that the libraries (DLLs etc.) are mapped in the Memory-mapped segment of a process. Now, when a process runs and calls the function of a library, I believe that the program counter (PC) of the thread changes to…
AvinashK
  • 3,309
  • 8
  • 43
  • 94
-1
votes
3 answers

How to develop a program that use only one single core?

I want to know how to properly implement a program in C++, in which I have a function func that I want to be executed in a single thread. I want to do this, because I want to test the Single Core Speed of my CPU. I will loop this function(func) for…
-1
votes
1 answer

Single threaded Socket timer watched

I need to create a single threaded watcher that monitors socket connections to see if they are open or were open before, and in case it is false, output a log line. In the classes that opens the socket connection (3 different ones) I created a timer…
eSp
  • 45
  • 5
-1
votes
1 answer

Call a method that has already been called in a new thread

I have a method "ImportExcel" that is called in a new thread: [STAThread] private void btnImportExcel_Click(object sender, EventArgs e) { // Start by setting up a new thread using the delegate ThreadStart // We tell it the…
Samar Rizvi
  • 423
  • 5
  • 18
-1
votes
1 answer

Can concurrency, in a server, be implemented using only a single thread?

I know multithreading is ideal for this situation, but would there be any instance of where this situation could be applicable?
-2
votes
1 answer

How Node handles the concurrent request and how we can handle these concurrent requests one by one in code

I am doing something in the function(some asynchronous work) for the first request but at the same time a few more requests came, now my thread was working on the function(some asynchronous work) but at the same time node has started processing the…
Kunal Pal
  • 545
  • 8
  • 21
-3
votes
1 answer

What makes asynchronous single threaded java code asynchronous

So we are currently working on an app in java and a colleague introduced me to asynchronous programming and it doesn't matter how much I research it, to me it seems that is synchronous. So the main advantage of asynchronous code appears to be the…
-3
votes
1 answer

How are Single thread of NodeJS and Go lang better than multi thread of Java?

I wanna compare NodeJS, Go lang,and Java. I search about concurrency control. The result are the concurrency control of Java is multi thread, the concurrency control of NodeJS and Go lang are single thread. So, I wanna know how are Single thread of…
Tarkonak etak
  • 19
  • 1
  • 1
-3
votes
1 answer

Differences between StringBuffer and StringBuilder

Why StringBuffer is thread safe and why StringBuilder is not. Why the StringBuffer is working best in multi-threading and StringBuilder is in single-threading. I saw there are methods which are common for both StringBuilder and StringBuffer, then…
Dhivakar
  • 2,081
  • 5
  • 15
  • 18
-4
votes
1 answer

Java : Thread infinite loop

I want to write a program which polls a particular table for new entries and writes them to a message queue. I was thinking of writing a thread which will loop infinitely and try to get database exclusive lock and thread.sleep() will be called if…
1 2 3
13
14