Commit Graph

36 Commits

Author SHA1 Message Date
Pietro Peterlongo a46cc59627
fix web framework name Looper -> Scorper (#189)
apparently it has changed name
2021-05-27 10:53:11 +02:00
Jacek Sieka 4abd7a5645
exception tracking (#166)
* exception tracking

This PR adds minimal exception tracking to chronos, moving the goalpost
one step further.

In particular, it becomes invalid to raise exceptions from `callSoon`
callbacks: this is critical for writing correct error handling because
there's no reasonable way that a user of chronos can possibly _reason_
about exceptions coming out of there: the event loop will be in an
indeterminite state when the loop is executing an _random_ callback.

As expected, there are several issues in the error handling of chronos:
in particular, it will end up in an inconsistent internal state whenever
the selector loop operations fail, because the internal state update
functions are not written in an exception-safe way. This PR turns this
into a Defect, which probably is not the optimal way of handling things
- expect more work to be done here.

Some API have no way of reporting back errors to callers - for example,
when something fails in the accept loop, there's not much it can do, and
no way to report it back to the user of the API - this has been fixed
with the new accept flow - the old one should be deprecated.

Finally, there is information loss in the API: in composite operations
like `poll` and `waitFor` there's no way to differentiate internal
errors from user-level errors originating from callbacks.

* store `CatchableError` in future
* annotate proc's with correct raises information
* `selectors2` to avoid non-CatchableError IOSelectorsException
* `$` should never raise
* remove unnecessary gcsafe annotations
* fix exceptions leaking out of timer waits
* fix some imports
* functions must signal raising the union of all exceptions across all
platforms to enable cross-platform code
* switch to unittest2
* add `selectors2` which supercedes the std library version and fixes
several exception handling issues in there

* fixes

* docs, platform-independent eh specifiers for some functions

* add feature flag for strict exception mode

also bump version to 3.0.0 - _most_ existing code should be compatible
with this version of exception handling but some things might need
fixing - callbacks, existing raises specifications etc.

* fix AsyncCheck for non-void T
2021-03-24 10:08:33 +01:00
Jacek Sieka b964ba2966
Update README (#167) 2021-03-20 08:12:35 +01:00
cheatfate 03707426e4
Remove Travis CI badge and move Github Actions badge. 2021-02-28 00:12:49 +02:00
Ștefan Talpalaru 39456e9c18
README: remove claim about temp var reordering (#155)
...between `await` calls. Can no longer replicate.
2021-02-10 16:49:12 +02:00
andri lim c1f6e7276e
add github action script (#144) 2021-01-20 17:36:10 +02:00
Zahary Karadjov 826d48c4aa Revert "more docs (#111)"
This reverts commit d0a17d551f.

Moving CancelledError outside of the established Nim hierarchy is
not a solution that has rough consensus and has an unknown impact
on compatibility with otherwise correctly implemented cancellation
code (for example when `CatchableError` is caught, cleanup is done,
then the exception is reraised). Further, this breaks the established
convention in the Nim community that Exception should not be inherited
from, complicating compatibility with future Nim versions that may
enforce this more strongly.
2020-08-16 01:48:25 +03:00
Zahary Karadjov 03f4a26829 Revert "yieldAsync() (#120)"
This reverts commit 284d677815.

There is no rough consensus for how this should be implemented and
whether it's needed indeed - a use case that cannot be solved with
a queue or a lock/event should be identified before pursuing this
functionality.
2020-08-16 01:48:25 +03:00
Ștefan Talpalaru 284d677815
yieldAsync() (#120) 2020-08-10 15:31:21 +02:00
Ștefan Talpalaru d0a17d551f
more docs (#111)
* more docs

* make CancelledError and object of Exception
2020-08-06 20:52:50 +02:00
Ștefan Talpalaru 63041b2d8f
start documenting the library (#109)
* start documenting the library

* introduce futures

* running the event loop

* async procs and "await"

* more "await" examples

* clarify internal callback creation

* error handling

* address review comments

* remove TODO item

* more about future completion
2020-07-13 17:59:11 +02:00
Jacek Sieka 4cc1b42108
Remove ad comparison from front page 2019-08-06 12:49:45 +02:00
Bruno Škvorc 62da8212a4
Updated README to match nimbus-launch template 2019-05-20 17:43:23 +02:00
Mamy Ratsimbazafy 79376dab20
Appveyor doesn't rename projects properly 2019-02-06 18:03:15 +01:00
cheatfate 4b084f276d Fix badges. 2019-02-06 18:57:33 +02:00
Jacek Sieka 47b19a55fd
Update README.md 2019-02-06 16:43:27 +01:00
Mamy Ratsimbazafy 9f15c6b752
Rebrand Asyncdispatch2 to Chronos [WIP] (#20)
* Update file headers, copyright date

* Rename files and hopefully fix nimble

* Forgot to change path in tests

* Update readme
2019-02-06 15:49:11 +01:00
Bruno Škvorc 90f2a50dda
Update README.md 2019-01-02 14:53:00 +01:00
Jacek Sieka 00d7d49ef1
readme: update license 2018-09-05 12:45:22 -06:00
Jacek Sieka e53c8d0f4e
update readme 2018-09-04 21:36:14 -06:00
Jacek Sieka 9d2222596d
update readme 2018-09-04 21:27:01 -06:00
cheatfate 98a85c5614 Fix #7. 2018-08-18 00:25:34 +03:00
cheatfate 50a91cef9f Update licenses badges. 2018-06-19 02:08:55 +03:00
alexm-status 3e0cc658b0
Update README.md 2018-05-30 14:27:08 -07:00
cheatfate 490f8484ca Update README. 2018-05-30 06:35:58 +03:00
cheatfate 4f670ac7e8 Update documentation in README. 2018-05-30 06:34:58 +03:00
cheatfate ebbb5b73ef Updated README. 2018-05-30 06:32:47 +03:00
alexm-status 645108813f
Update README.md 2018-05-29 09:49:05 -07:00
alexm-status e823a52db4
Copy-edited README 2018-05-29 09:24:34 -07:00
cheatfate e33ed13fb5 Updated README. 2018-05-29 02:45:15 +03:00
cheatfate 3c7273d532 Update README. 2018-05-29 02:38:53 +03:00
cheatfate edcc628b30 Update README. 2018-05-29 02:37:06 +03:00
cheatfate 5529fc4669 Updated README.
Updated documentation.
2018-05-29 02:35:15 +03:00
Your Name ab91baff47 Add AppVeyor badge. 2018-05-22 01:15:34 +03:00
Your Name 52bf688179 Add Travis badge, and trigger first test. 2018-05-22 01:04:49 +03:00
Eugene Kabanov 28ae5ff057
Initial commit 2018-05-16 11:18:44 +03:00