Skip to main content
0 votes
0 answers
36 views

I'm using Apple's private MultitouchSupport.framework to receive raw trackpad touch data on macOS. The basic pattern is: MTDeviceCreateList() / MTDeviceCreateDefault() to get device references ...
NullPointerDepressiveDisorder's user avatar
5 votes
2 answers
151 views

I have a pipeline where: Lambda A reads DynamoDB and publishes events to Kinesis Kinesis partitions events by key Lambda B consumes the stream and writes the latest record per key back to DynamoDB ...
Yasin Türk's user avatar
1 vote
1 answer
69 views

I’m running into a race condition when using an Oracle MERGE statement from a Spring Boot application, and I’m trying to understand why this happens and what the correct way to handle it is. When ...
Shireesha Kanikireddy's user avatar
Advice
0 votes
2 replies
113 views

The main lines of GCC's implementation of std::call_once are these ones (with _GLIBCXX_HAS_GTHREADS): 'libstdc++-v3/include/std/mutex:939' enum _Bits : int { _Init = 0, _Active = 1, _Done = 2 }; '...
Arjonais's user avatar
  • 775
0 votes
0 answers
92 views

I have this script in my Next.js project, where I start a Next.js server (because the tests need it) and run Jest tests using concurrently: "test": "npm run services:up && ...
Isaac Muniz's user avatar
1 vote
1 answer
97 views

I am building an e-commerce with Rails 8 and Stripe through their API for a pottery business. These are all unique, one-off items for now and with the demand she already has, I anticipate her site ...
Clint Zold's user avatar
3 votes
1 answer
86 views

In Java, when using scheduleAtFixedRate, is it possible for a task to execute before the ScheduledFuture returned by scheduleAtFixedRate has been assigned? For example, could the following code throw ...
Xin Zhang's user avatar
1 vote
0 answers
57 views

I'm currently using gem5-dpdk (GitHub) with the following cache hierarchy setup: Using ARM version(O3 cpu), full system mode Simulating DPDK network application (e.g., MACSWAP) L1 Cache: no ...
SungwookKang's user avatar
4 votes
1 answer
140 views

I’m trying to monitor CPU usage on Linux by reading /proc/stat. I'm stressing the CPU to get 100%. I use a function getCpuUsage() based on comparing consecutive /proc/stat readings. The return value ...
Krypton024's user avatar
Advice
0 votes
4 replies
147 views

I recently had an interview where I was asked to show how to prevent race conditions in C or C++ between two threads operating on shared data. I used a mutex as follows : pthread_mutex_t mutex; int ...
Engineer999's user avatar
  • 4,159
5 votes
0 answers
232 views

I have the following program. The relevant info is: There are 3 variables atomic<int> x,y,z accessed by all threads. 3 writer threads: Each thread read all 3 values x,y,z, and update exactly 1 ...
Huy Le's user avatar
  • 2,009
0 votes
1 answer
94 views

I have a Flask application running on Gunicorn with 2 workers and 2 threads each (4 concurrent execution contexts). My custom logging function writes to a file without any process-level locking: def ...
user29255210's user avatar
3 votes
2 answers
166 views

class MyTest { void getter() { std::unique_lock lock(mutex_); if (!set_) { cout << "set already" << endl; } lock.unlock(); // question ...
SuperBald's user avatar
  • 333
4 votes
1 answer
159 views

class MyTest { void getter() { std::unique_lock lock(mutex); if (!set_) { cout << "set already" << endl; ...
SuperBald's user avatar
  • 333
3 votes
0 answers
86 views

I have a scheduling system on MongoDB using Node.js + Mongoose. Collections: Drivers, Vehicles, Trips. I need to insert a new Trip for a given driverId, date, startTime, endTime only if that driver ...
Netanel Alis's user avatar

15 30 50 per page
1
2 3 4 5
165