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
1
vote
1 answer

wxpython StaticText.SetLabel doesn't update in a single-threaded GUI when .Wrap is used?

I have a long running python script that is currently terminal driven. I'm required to put a GUI front-end on the process to make it more user-friendly. Currently the GUI and long-running-process both run in the same thread. (I plan to improve this…
Pod
  • 3,938
  • 2
  • 37
  • 45
1
vote
0 answers

Combining libwebsockets with normal sockets using poll() - SSL connection overhead?

I have a single-threaded AIX server that polls multiple sockets and a message queue all using the poll() function (AIX has that neat feature of poll handling both, and it works well with ~1000 sockets). I'm wondering if it'd be a bad idea to add…
littlenoodles
  • 435
  • 4
  • 13
1
vote
2 answers

how node.js server queued concurrent request

Let's say we have 3 request(A,B,C) hitting our node.js server at the same time. What will be node.js criteria to identify which request should be executed first of all? One more thing all request are blocking operations.
Alok Deshwal
  • 1,128
  • 9
  • 20
1
vote
2 answers

Is volatile useful at all in a singlethreaded application in Java?

As in the title - is there any case in which volatile is useful in the context of single-thread programming in Java? I know it's used to make sure the value of the variable is always actually checked in memory so is there any case in which that…
NPS
  • 6,003
  • 11
  • 53
  • 90
1
vote
3 answers

Can single thread do everything that multithread can do?

My 1st Question: As per the title. I am asking this because I came across a StackExchange question: What can multiple threads do that a single thread cannot? In one of the solutions given in that link states that whatever multithread can do, it can…
user3437460
  • 17,253
  • 15
  • 58
  • 106
1
vote
1 answer

Why a java single threaded program uses futex and clone system calls

This is a single threaded java program to find factorial of a given number passed as an argument, using recursion. class factorial{ public static void main(String[] args){ int number=0; try { number = Integer.parseInt(args[0]); …
nohup
  • 3,105
  • 3
  • 27
  • 52
1
vote
1 answer

Node.js single thread VS Tranditonal webserver thread pool

I am a newbie to node.js. I am currently reading the book called 'Beignning Node.js' by Basarat Ali Syed. Here is an excerpt from it which states the disadvantage of thread pool of traditional web servers: Most web servers used thread pool this …
Shaohua Huang
  • 698
  • 5
  • 19
1
vote
2 answers

setInterval and clearInterval in JavaScript as a single thread language

I have a problem understanding the way in which setInterval and clearInterval work in JavaScript. I have read different articles on these two functions but I am still confused. Given the fact that JavaScript is single thread then when we call…
Suo6613
  • 431
  • 5
  • 17
1
vote
1 answer

Single-threaded Java application starts over 70 threads

I just experienced a very strange behaviour of the (openJDK) JVM, when starting my single-threaded application on our compute server: The JVM starts a lot (really a lot) of threads that heavily increase the CPU load on all processors and I don't…
1
vote
2 answers

NodeJS: understanding nonblocking / event queue / single thread

I'm new to Node and try to understand the non-blocking nature of node. In the image below I've created a high level diagram of the request. As I understand, all processes from a single user for a single app run on a single thread. What I would…
html_programmer
  • 18,126
  • 18
  • 85
  • 158
1
vote
2 answers

How does JavaScript's Single Threaded Model handle time consuming tasks?

This question is regarding the sinlge threaded model of JavaScript. I understand that javascript is non-block in nature cause of its ability to add a callbacks to the async event queue. But if the callback function does infact take a long time to…
Lakmal Caldera
  • 1,001
  • 2
  • 12
  • 25
1
vote
1 answer

Understanding cpu frequency, thread selection and more

With a 1270v3 and a single thread app I'm at the end of performance but when I watch monitoring tools like atop I don't understand how this whole stuff works. I tried to find a nice article about this sort of topic but they either have been…
user2693017
  • 1,750
  • 6
  • 24
  • 50
1
vote
2 answers

How to implement Java single Database thread

I have made a Java program that connects to a SQLite database using SQLite4Java. I read from the serial port and write values to the database. This worked fine in the beginning, but now my program has grown and I have several threads. I have tried…
1
vote
1 answer

Execute multi threaded program in Python to run as single thread

I've been using threading class alot in my Python codes and have successfully make a couple routine to run as multi-threaded. The problem is when something fails, it becomes a pain when it comes to debugging. This is what my code block would look…
1
vote
1 answer

Javascript form submit waiting till finishes

I have a form with upload
and it's submit using javascript form another form submit…