Skip to main content
Filter by
Sorted by
Tagged with
6 votes
0 answers
355 views

Under Delphi for Linux, TEvent.SetEvent() is implemented as follows: procedure TEvent.SetEvent; var I: Integer; begin sem_getvalue(FEvent, I); if I = 0 then sem_post(FEvent); end; Although ...
qgi's user avatar
  • 347
5 votes
2 answers
157 views

Recently, when working with C atomics, I've noticed that there are two variants: a "normal" version, whose order is always seq_cst, and an "explicit" version, where the programmer ...
lzg's user avatar
  • 123
Advice
0 votes
6 replies
139 views

I have a pretty good understanding of how async await works under the hood. One thing I am curious about is what actually ensures the memory of the generated state machine is synchronized to the other ...
nathanAjacobs's user avatar
1 vote
1 answer
103 views

I'm working on a macOS app that uses Apple's private MultitouchSupport.framework to intercept raw trackpad touch data. The framework uses C-style callbacks that fire on an internal background thread (...
NullPointerDepressiveDisorder's user avatar
1 vote
1 answer
251 views

By "thread-safe" I mean: If two threads simultaneously read from the same XDocument, will there be trouble? By "read" I mean: The code uses only non-mutating operations, e.g. read ...
Heinzi's user avatar
  • 174k
1 vote
0 answers
138 views

Does FastAPI use new threads per request? In my fastapi app, I have a global singleton class that uses boto3 to connect to s3 using a service resource. This class is inited at startup and is used ...
A-Abe's user avatar
  • 83
Advice
3 votes
8 replies
202 views

I want to use multiple threads to decode PNG files to speed up loading in my C++ game engine. The easiest solution is to use IMG_Load from SDL_Image, as I already use SDL, e.g.: surface = IMG_Load(...
Nikolaj's user avatar
  • 1,175
1 vote
2 answers
138 views

I finally found out the basic mechanism that C# uses to implement an async/await construct (using continuations). However, this led me to question data integrity. Imagine the following: class ...
Simon Parker's user avatar
  • 1,914
0 votes
1 answer
106 views

I’ve been working as a .NET C# developer for a little over two years in a software company. For almost a year now, I’ve been leading (as team leader/PM) a project that actually started before I joined....
lorenzo mastrofini's user avatar
0 votes
3 answers
123 views

I'm quite new to rust and want to do two function in parallel. shoot(&fleet_a, &mut fleet_b) shoot(&fleet_b, &mut fleet_a) since they only take information from one and modify some ...
basicn00b's user avatar
2 votes
0 answers
217 views

Is the Windows Audio Session API (WASAPI) thread safe? Is it okay to call IAudioClient::Start from one thread and then call IAudioClient::GetCurrentPadding and IAudioRenderClient::GetBuffer from a ...
eyelash's user avatar
  • 4,156
0 votes
0 answers
46 views

AudioControl::AudioControl(QObject* parent) : QObject { parent } , QRunnable() { m_loop = pa_mainloop_new(); if (!m_loop) return; m_api = pa_mainloop_get_api(m_loop); ...
DjDj_I_want_fly's user avatar
3 votes
1 answer
144 views

I'm playing around with lockless C++ programming, and I came up with a method for safely(?) transferring ownership of a non-thread-safe data structure (std::unordered_map<int, float> in my ...
Jeremy Friesner's user avatar
1 vote
1 answer
71 views

I need to access the same array from main thread and multiple setTimeout/event handlers? May array operation interrupt another array operation when it is called from, setTimeout/event handler function?...
t1m013y's user avatar
  • 136
0 votes
1 answer
85 views

class FGAClientWrapper: """ A synchronous, gevent-friendly wrapper for the async OpenFGA SDK. """ def __init__(self, call_timeout: float | None = 10.0): ...
vaibhav's user avatar
  • 18

15 30 50 per page
1
2 3 4 5
637