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
2
votes
1 answer

Vert.x event looping with single thread

I am using vert.x 2.1.5 version. And I was trying to use event looping in my project. sample code given below JsonObject result = null; //loop starting for (int i=0;i
NIKHIL K A
  • 328
  • 5
  • 16
2
votes
2 answers

Multi-thread process on multi-core or single-core double the speed?

Assume I have a process that consists of two ideally independent tasks (ideally, to remove the communication overhead). Would it be faster to do it on a single-core processor of 3GHz speed or two-core processor of 1.5GHz speed? Of course, in case of…
2
votes
1 answer

How to deal with a race condition

I'm pretty new to web development. From what I've read on race conditions I thought with node or JS they wouldn't be possible because of it being single threaded, but I see that is.. I guess wrong. With this little example can someone explain how it…
2
votes
2 answers

Why can I deadlock in a single-threaded FLTK application?

I have a supposedly single-threaded FLTK application with a popup menu, created with Fluid. I have a class that sub-classes Fl_Gl_Window and implements a handle() method. The handle() method calls a function that creates a popup window on…
cape1232
  • 999
  • 6
  • 21
2
votes
3 answers

nodeJS - cant understand the behavior of the code

function placeOrder(orderNo) { console.log("Order is: " + orderNo); setTimeout(deliver(orderNo),5000); } function deliver(orderNo) { console.log("Item is delivered with Order No.- " +…
Neil
  • 59
  • 1
  • 7
2
votes
3 answers

TcpListener server loop to idle until there is a pending connection

For the purpose of this question, I have made a super simplified example: using System; using System.Net; using System.Net.Sockets; namespace Loop { class Program { public static void Main (string[] args) { …
tomsseisums
  • 13,168
  • 19
  • 83
  • 145
2
votes
2 answers

Wcf Singleton with Single Thread

Can someone explain the issues that although I set both the InstanceContextMode and ConcurrencyMode to single with max concurrent calls instances and sessions set to 1 in ServiceThrottlingBehavior, I still found that at least 2 threads are…
Mark Yuan
  • 850
  • 1
  • 8
  • 17
2
votes
1 answer

Single Threaded MDB on Glassfish

I have a number of MDBs running on Glassfish 3.1.2.2. Due to the nature of work on one of the MDBs I need to make it single threaded. I looked at the Tuning Guide, and while setting the maximum pool size to 1 does resolve the problem, it also means…
2
votes
1 answer

Single-threaded Java Websocket for Testing

We are developing an application with Scala and Websockets. For the latter we use Java-Websocket. The application itself works great and we are in the middle of writing unit tests. We use a WebSocket class as follows class WebSocket(uri : URI)…
str
  • 42,689
  • 17
  • 109
  • 127
2
votes
4 answers

GWT Single threaded async callbacks

rpc.call(mycallback); { //subsequent code block } How does the single threaded async callback work? When will the callback get called? Will the subsequent code block always finish executing before the callback is allowed to run (i.e. will the…
DD.
  • 21,498
  • 52
  • 157
  • 246
2
votes
3 answers

How to use setTimeout in a recursion to avoid browser from getting stuck on complicated processes

I have this code that uses an inefficientProcess() that consumes plenty of memory: My goal is to use some sort of setTimeout(function(){...},0) technique so the browser will not get stuck while executing the code. How do I change the code so it will…
Alon
  • 7,618
  • 18
  • 61
  • 99
2
votes
1 answer

Force a stored procedure to run single threaded

I have a stored procedure running on a multi-core system. It is executed in multi-threaded way. Due to, may be, some thing in the query, execution of some of the threads hangs forever with cx_packet wait and lock. Is there a way to force single…
Faith Wins
  • 411
  • 1
  • 5
  • 10
2
votes
2 answers

How to marshal work onto single thread c#

I have an app that needs to process some packets from a UDP broadcast, and write the result to a SQL database. During intervals the rate of incoming packets gets quite high, and I find that the underlying buffer overflows, even at 8MB, because of…
Vort3x
  • 1,778
  • 2
  • 20
  • 37
1
vote
3 answers

timeout for method on UI thread

I have the problem that I'm instanciating an object on the UI-thread (WinForms). This object creation probably takes very long, and I would like to have some sort of a "timeout" for that method (because it's blocking my app). The problems I have…
Martin Moser
  • 6,219
  • 1
  • 27
  • 41
1
vote
1 answer

What does it actually mean by the term 'single-threaded process' specific to PHP and how and why does the request get blocked in this case?

Today I came across the following statement from PHP Manual: The web server runs only one single-threaded process, so PHP applications will stall if a request is blocked. After reading and trying to understand the above statement firstly I didn't…
user10442481