Skip to content

v0.4.0: Major overhaul of concurrency system

Latest
Compare
Choose a tag to compare
@Geod24 Geod24 released this 03 Jun 01:47
· 14 commits to v0.x.x since this release

This release comes with a brand new concurrency system,
originally a fork of std.concurrency which was modified
to support the notion of channels (inspired from Golang's API).
It should not interact (or conflict) with std.concurrency anymore.

Other major changes:

  • Threads can now be shut down explicitly;
  • Request mismatch are now handled gracefully (the node won't crash);
  • There is a new module, geod24.Registry, to allow easily mocking a router / DNS;
  • The std.concurrency priority messages have been removed;
  • Localrest can now use a custom serialization policy, with vibe.data.json being the default;
  • An comprehensive error message will now be printed out when a node dies (including instantiation location);
  • Nodes responding to dead peers will no longer crash;
  • Control interface: Shutdown can now accept a custom callback for user-defined cleanup;
  • setTimer (similar to Vibe.d) and schedule have been implemented for task management;
  • Control interface: Nodes can now be restarted;
  • Client error (e.g. peer dead, unimplemented methods) are now separate from error response (e.g. wrong parameter);
  • Various improments around Tid to make type mismatch harder;
  • The scheduler can now be used from the node constructor;
  • All operations now default to a timeout of 5 seconds (previously: unlimited);
  • Self connecting nodes (nodes that connect to themselves) should now work properly;