We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 791d6f4 commit 00634eeCopy full SHA for 00634ee
src/AsyncTask.php
@@ -99,6 +99,24 @@ public function __construct(Closure|AsyncTaskInterface $theTask)
99
$this->theTask = $theTask;
100
}
101
102
+ public function __serialize(): array
103
+ {
104
+ // serialize only the necessary info to reduce runner cmd length
105
+ return [
106
+ 'theTask' => serialize($this->theTask),
107
+ 'timeLimit' => $this->timeLimit,
108
+ ];
109
+ }
110
+
111
+ public function __unserialize($data): void
112
113
+ [
114
+ 'theTask' => $tempTask,
115
116
+ ] = $data;
117
+ $this->theTask = unserialize($tempTask);
118
119
120
/**
121
* Inside an available PHP process, runs this AsyncTask instance.
122
*
0 commit comments