F3XTeam / RBX-Try-Library

A library for controlling the flow of error-prone, interdependent functions.
12 stars 3 forks source link

Add asynchronous version of Try #4

Open GigsD4X opened 7 years ago

GigsD4X commented 7 years ago

It'd be neat to have an asynchronous version of this library, since manually running it asynchronously requires untidy boilerplate code to wrap the calls up, which this library is meant to eliminate the need for.

Validark commented 7 years ago

Could I convert this library to asynchronous by default, and then use :Wait() for when you want to yield until it is complete? I don't want two separate versions if possible. Let me know what syntax you think it should have.

GigsD4X commented 7 years ago

That may be a pretty elegant solution! This would be good to get into 2.0.0 since it's already including breaking changes. Adding :Wait() after an operation should make the thread yield until the attempt and any operations queued before the :Wait() finish executing