Skip to content

Conversation

@vito
Copy link
Owner

@vito vito commented May 3, 2022

  • takes a thunk and a callback function
  • runs the thunk concurrently
  • calls the callback with a boolean indicating success or failure
  • returns a function which can be called to wait for the thunk and return the result of the callback

so (succeeds? thunk) is implemented as ((start thunk id))

when the callback returns an error, the underlying error will be tacked on to the end; that way (run) can wrap the error with a higher-level message, while preserving the lower-level details

@vito vito added the enhancement New feature or request label May 3, 2022
@vito vito changed the title add (start) primitive beneath (run) and (suceeds?) add (start) primitive beneath (run) and (succeeds?) May 3, 2022
@vito vito merged commit a07b926 into main May 3, 2022
@vito vito deleted the add-start branch May 3, 2022 00:55
@vito vito mentioned this pull request May 3, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants