Commit graph

18 commits

Author SHA1 Message Date
Sönke Ludwig
e3c680b0ce
Add assertion to ManualEvent to check for failure of creating event handles. 2017-03-27 16:32:24 +02:00
Sönke Ludwig
f9372446b1 Improve the sync module.
- Change the API of Monitor to work without a callback
- Add ManualEvent.emitSingle
2017-02-22 17:42:20 +01:00
Sönke Ludwig
8f6c4dd536
Fix LocalTaskSemaphore.
Fixes a potential hang, potential over-use of lock slots and only needs a single LocalManualEvent now instead of one created for each wait.
2017-01-30 10:07:06 +01:00
Sönke Ludwig
b391ebabbe
Add more specific assertion for SpinLock initialization. 2017-01-27 22:50:57 +01:00
Sönke Ludwig
5f980acefd
Upgrade to latest eventcore. 2017-01-25 21:04:13 +01:00
Sönke Ludwig
9d4e8086ff Make the callback type the first argument to Waitable!(). 2017-01-16 00:23:37 +01:00
Sönke Ludwig
f015662a94 TCPConnection and async improvements.
- asyncAwaitAny now takes the callback type, so that parameter storage classes are handled correctly
- Implement TCPConnection.remoteAddress/localAddress
- Implement TCPConnection.tcpNoDelay, keepAlive and readTimeout
- Implement timeout handling for TCPConnection.waitForData
2017-01-15 20:59:36 +01:00
Sönke Ludwig
fdfbb55aa8 Re-implement ManualEvent.
This simplifies the logic by separating thread local notifications from cross-thread notifications, as well as replacing lockless operations by a spin lock. The thread local variant of ManualEvent is now also separated into a LocalManualEvent type.
2017-01-13 22:24:18 +01:00
Sönke Ludwig
ece639ee01 Improve assertion/test coverage of ManualEvent. 2017-01-11 17:46:36 +01:00
Sönke Ludwig
1b2c0f33d1 Fix timeout handling in ManualEvent.
The timeout could was re-applied in every loop iteration of the wait routine, possibly causing an infinite loop.
2016-12-19 20:19:58 +01:00
Sönke Ludwig
5e89ac4e91 Safe-ify sync module. 2016-11-02 21:01:09 +01:00
Sönke Ludwig
1eb06c4b1a Mark ManualEvent's interface as safe. 2016-10-25 08:55:48 +02:00
Sönke Ludwig
e294d24a4b Update for latest eventcore version. 2016-10-05 14:40:29 +02:00
Sönke Ludwig
914e9ad894 Change debug version "VibeMutexPrint" -> "VibeMutexLog". 2016-10-04 17:53:40 +02:00
Sönke Ludwig
1005f5c674 Fix all ManualEvent related tests. 2016-06-17 22:33:04 +02:00
Sönke Ludwig
e8ba981263 Draft proper shared semantics for ManualEvent. 2016-06-15 18:21:33 +02:00
Sönke Ludwig
3b0e4e0452 Big refactoring step.
- Moves a lot of stuff from vibe.core.core to vibe.core.task
- Introduces TaskScheduler to unify the scheduling process
- Refines how tasks are scheduled and processed (can push to the front of the task queue and uses a marker task to keep track of the spot up to which to process)
- Start to add proper support for task interrupts and timeouts by properly cancelling in-flight async operations
- Work on ManualEvent - still not functional for the shared case
- Implement proper IP address parsing in NetworkAddress
2016-06-14 08:01:03 +02:00
Sönke Ludwig
7e2d1dd038 Initial commit.
The library is able to support simple TCP servers in the current state. The API is still mostly compatible with mainline vibe.d, but the driver systen has been replaced by the eventcore library and sockets/files/timers/... are now structs with automatic reference counting instead of GC collected classes. The stream interfaces have been removed for now.
2016-03-01 20:30:42 +01:00