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
0 answers

How to achieve single threaded concurrency with blocking functions in Rust?

I am new to Rust, I want to know if it is possible to write a single-threaded concurrent application if non-blocking APIs are not available. I have written a server-side code for a VPN using a UDP socket and tun device (virtual network interface) to…
0
votes
2 answers

How to make an ASP.NET app to be single threaded

I am trying to force an asp.net app to be single threaded ie: can only serve one request at time (need to do this to simulate a legacy application). All I could think of was use a static variable to lock and Monitor.TryEnter and sleep the thread for…
Ricky Gummadi
  • 4,559
  • 2
  • 41
  • 67
0
votes
0 answers

Single-threaded concurrency in Python

I am having difficulty understanding concurrency, single-threadedness and Python's threading. Is it possible to have single-threaded concurrency model in Python? How does such a model works
0
votes
1 answer

Can someone explain JS Event Loop?

So I kind of understand the JS event loop, but still have a few questions. Here is my scenario and a few questions. So let's say I have these functions: function1 - reads an absolute huge file. function2 - console.log("Hey"); function3 -…
Aman
  • 11
  • 3
0
votes
0 answers

Is there any solution to diminish the time of the VBA loop below considering VBA is "by default" single threaded? It's a sum loop

The idea of the loop is to iterate for an n number of foods, calculate the calories of each element and calculate the total sum of all (it's a sum loop). The loop has an (n) time complexity, I believe... is there any possibility of multi-threading…
0
votes
1 answer

Handling multiple requests with express

I have a background with Java and I am relatively new to node. I am trying to understand node in relation to the fact that it is single threaded, but can still handle multiple requests at the same time. I have read about the single thread and the…
Lull
  • 365
  • 3
  • 14
0
votes
0 answers

How to skip a queue item in a single thread?

I have queue maintained by a single thread. The thread will do some operations on each item of the queue in turn. I want the single thread could skip certain queue item and go on for the next item when I click a button (or some other…
Dream Land
  • 31
  • 5
0
votes
0 answers

Problem updating a resource array due to node single thread concurrency

Tables: users user_category categories user_id (PK) user_id (PK) category_id (PK) name category_id (PK) name I'm having problems with concurrency on node, I'll describe an example to reproduce the error I have: When receiving 5…
0
votes
1 answer

Can/should Thread Switching be controlled?

Forgive me - I'm not a hardware tech, just an app user. Background: I've observed that when I am running one large process in a singlethreaded program (OCAD, QGIS, usually R, etc), I can see that one of my cores (8 phys, 16 log, i9_9900K CPU) is at…
0
votes
1 answer

PHP application slow processing on AWS EC2 when heavy traffic hits

I have a cloud-based application written in PHP 5.6. It is a supermarket application that has traffic in some specific hours. In those peak hours, when large traffic hits across multiple supermarkets, the processing slows down among all the…
0
votes
1 answer

How can I reuse same HttpClient Connection in my Single threaded Java Client Application?

I am working on one Single threaded java client . It is making One HttpClient connection to hit some API's. I want to use same connection object to hit another set of API's after sometime. It is running on single JVM and JVM is running throught the…
0
votes
0 answers

I'm Creating Worker with node Cluster module now, I need to set load balance

My question is, now that I need a load balancer something else, or this Worker that I create according to the CPUs Core size works perfectly well in the node app. const express = require("express"); const cluster = require("cluster"); const…
Smit Gajera
  • 1,001
  • 1
  • 8
  • 26
0
votes
2 answers

Java - Allow one thread in a method without waiting

I've a situation where I need to implement a thread safe method, The method must be executed by only one thread at a time, And while the method is being executed by a thread, all other threads trying to execute the same method shouldn't wait and…
0
votes
0 answers

Nodejs / ExpressJs - Making parallel api request to do synchronous / asynchronous job

I know that javascript is single threaded, meaning only one operation runs at a time. Now consider the following scenario: Scenario 1: I have a nodejs/express server running on port 5000, it has an endpoint, say, /convert-image. This endpoint…
Phantom007
  • 2,079
  • 4
  • 25
  • 37
0
votes
1 answer

Does all single threaded software run on the main core/thread?

I'm planning to run for example 10 instances of a single software - single-threaded game server. They will run on a server machine(not VPS) on plain Linux Ubuntu(console version). My question is, if I do this, all the load will be on the main…
Aviv
  • 5
  • 2