not yet working coroutines

This commit is contained in:
ading2210 2024-03-19 13:45:21 -04:00
parent 2a072ecee0
commit e5118c9c2e
8 changed files with 102 additions and 11 deletions

View file

@ -3,7 +3,7 @@ class FTPSession extends CurlSession {
if (!url.startsWith("ftp://") && !url.startsWith("ftps://")) {
throw "invalid url protocol";
}
super();
super(1);
this.url = url;
this.options = options;

View file

@ -1,9 +1,8 @@
class CurlSession {
constructor(options={}) {
constructor(need_fiber=0) {
check_loaded(true);
this.options = options;
this.session_ptr = _session_create();
this.session_ptr = _session_create(need_fiber);
this.active_requests = 0;
this.event_loop = null;
this.requests_list = [];