Comments and a bug fix

This commit is contained in:
John Doty 2023-06-29 10:14:10 -07:00
parent a2dafeea12
commit 3b2af4bb14
2 changed files with 11 additions and 15 deletions

View file

@ -21,7 +21,12 @@ pub(crate) enum PromiseEvent {
/// A Promise is a small, thread-safe marker which represents a pending
/// promise inside the JS runtime. This is how you complete the promise: you
/// must either call `resolve` or `reject` before you drop the promise.
/// must either call `resolve` or `reject` before you drop the promise. If
/// you drop the promise without calling either `resolve` or `reject` then it
/// will panic.
///
/// In order to actually *process* the completion, someone must call
/// process_all_jobs on a context or the underlying runtime itself.
#[derive(Debug)]
pub struct Promise {
complete: bool,