1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00
Commit graph

20 commits

Author SHA1 Message Date
Desour
22b4f3becf add benchmark 2025-02-20 22:52:12 +01:00
Desour
d96894e606 make timeout explicit 2025-02-20 22:52:12 +01:00
Desour
157f22ef95 IPCChannelStuff -> IPCChannelResources
I think it should be simpler now.
2025-02-20 22:52:12 +01:00
Desour
6fca066a26 tmp 2025-02-20 22:52:12 +01:00
Desour
1c76f32d19 use more abstract macros to decide which implementation to compile 2025-02-20 22:52:12 +01:00
Desour
4f0085af00 make sure we copy from the shared memory only once 2025-02-20 22:52:12 +01:00
Desour
8cdf8ab95a IPCChannelEnd: make the signature of makeA and makeB platform independent
and let the IPCChannelEnd own the shared mem and other stuff
2025-02-20 22:52:11 +01:00
Jude Melton-Houghton
bda818840e Add IPC channel (for sscsm) 2025-02-20 22:52:11 +01:00
sfan5
b5e084c9a5
Update github URL references (#15705) 2025-01-24 16:50:39 +01:00
sfence
d849d51c2d
Replace licensing text in headers (LGPLv2.1) (#15321) 2024-10-28 15:57:39 +01:00
sfan5
27cb54c1db Stop misusing volatile keyword 2024-06-10 18:49:43 +02:00
sfan5
3fbe42c3a2 Add unittest to check thread_local destructor brokenness 2024-01-06 15:38:09 +01:00
Sebastien Marie
3fb1f45301
Remove Thread::kill() and related unittest (#10317)
Closes: #6065
2020-09-10 12:19:18 +02:00
Loïc Blot
88b436e6a9 Code modernization: subfolders (#6283)
* Code modernization: subfolders

Modernize various code on subfolders client, network, script, threading, unittests, util

* empty function
* default constructor/destructor
* for range-based loops
* use emplace_back instead of push_back
* C++ STL header style
* Make connection.cpp readable in a pointed place + typo
2017-08-19 22:23:47 +02:00
Loïc Blot
b3dfe5332c C++11 patchset 3: remove Atomic/GenericAtomic and use std::atomic (#5906) 2017-06-06 14:34:14 +02:00
ShadowNinja
c93f7f5cea Fix synchronization issue at thread start
If a newly spawned thread called getThreadId or getThreadHandle before
the spawning thread finished saving the thread handle, then the
handle/id would be used uninitialized.  This would cause the threading
tests to fail since isCurrentThread would return false, and if Minetest
is built with C++11 support the std::thread object pointer would be
dereferenced while ininitialized, causing a segmentation fault.

This fixes the issue by using a mutex to force the spawned thread to
wait for the spawning thread to finish initializing the thread object.

An alternative way to handle this would be to also set the thread
handle/id in the started thread but this wouldn't work for C++11
builds because there's no way to get the partially constructed object.
2017-01-28 18:52:07 -05:00
Loic Blot
61d1751dff Travis: build matrix improvements + CPP11 build 2016-10-06 00:28:24 +02:00
est31
c1bdb552bc Temporarily disable "testStartStopWait" Threading unit test on mac
The "testStartStopWait" unit test is unreliably failing on mac,
for some time already. See bug #3786.

Having the unittest fail unreliably doesn't help anybody but mostly
inhibits the main feature of travis builds: to test PRs for regressions.

Therefore, disable the specific unit test for until bug #3786
is fixed.
2016-07-04 22:46:52 +02:00
kwolekr
964be640cb Fix some threading things and add additional thread unittests
- Fix thread name reset on start()
- Fully reset thread state on kill()
- Add unittests to check for correct object states under various circumstances
2015-10-24 02:31:23 -04:00
ShadowNinja
e4bff8be94 Clean up threading
* Rename everything.
    * Strip J prefix.
    * Change UpperCamelCase functions to lowerCamelCase.
  * Remove global (!) semaphore count mutex on OSX.
  * Remove semaphore count getter (unused, unsafe, depended on internal
    API functions on Windows, and used a hack on OSX).
  * Add `Atomic<type>`.
  * Make `Thread` handle thread names.
  * Add support for C++11 multi-threading.
  * Combine pthread and win32 sources.
  * Remove `ThreadStarted` (unused, unneeded).
  * Move some includes from the headers to the sources.
  * Move all of `Event` into its header (allows inlining with no new includes).
  * Make `Event` use `Semaphore` (except on Windows).
  * Move some porting functions into `Thread`.
  * Integrate logging with `Thread`.
  * Add threading test.
2015-08-23 22:04:06 -04:00