This repository was archived by the owner on Sep 28, 2022. It is now read-only.
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
Segmentation fault when run in distinct coroutine context #55
Open
Description
The following code produce a segmentation fault. The problem is that the registration of coroutine callbacks were done only in the connect method. I have a fork that fix this bug. I can do a pull request if needed.
<?php
$db;
\Co\run(function() use (&$db){
$db = new \Swoole\Coroutine\PostgreSQL();
$db->connect("host=127.0.0.1 port=5432 dbname=wireskel user=wireskel password=xxxxxx");
});
\Co\run(function () use ($db) {
$res = $db->query('SELECT * from _cred_user'); // Segmentation Fault
});
Metadata
Metadata
Assignees
Labels
No labels