Skip to content

Commit

Permalink
Fix Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
VennDev authored Jul 30, 2023
1 parent e380ccf commit d93a46c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/vennv/vapm/EventLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected static function run() : void {
}

if ($fiber->isTerminated() && ($promise->getStatus() !== StatusPromise::PENDING || $promise->isJustGetResult())) {
MicroTask::addTask($id, $promise->setResult($fiber->getReturn()));
MicroTask::addTask($id, $promise);
self::removeQueue($id);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/vennv/vapm/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ public static function read(string $path) : Promise;
/**
* @throws Throwable
*
* Use this to write to a file or url.
* Use this to write to a file.
*/
public static function write(string $path, string $data) : Promise;

/**
* @throws Throwable
*
* Use this to append to a file or url.
* Use this to append to a file.
*/
public static function append(string $path, string $data) : Promise;

/**
* @throws Throwable
*
* Use this to delete a file or url.
* Use this to delete a file.
*/
public static function delete(string $path) : Promise;

Expand Down

0 comments on commit d93a46c

Please sign in to comment.