You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ReactPHP expects all PHP to be non-blocking. Therefore it's not easily possible to use launch or launchZen followed by regular blocking events in PHP. Currently there is a simple but dirty workaround. It's possible to manually tick the loop to have changes on zen-objects take effect.
114
+
115
+
```php
116
+
$progress = new ProgressDialog('Step 1');
117
+
$progress->setPulsate(TRUE);
118
+
$progress->setAutoClose(TRUE);
119
+
$progress_zen = $launcher->launchZen($progress);
120
+
121
+
// This regular command is blocking and breaks the asynchronous workflow
122
+
$hostname = gethostname();
123
+
124
+
$progress_zen->setText('Step 2');
125
+
$loop->tick();
126
+
127
+
// SQL is also regular blocking PHP
128
+
$get_sync = $db_serv->prepare('SELECT last_sync FROM tbl_sync WHERE hostname=?');
129
+
$get_sync->execute(array($hostname));
130
+
$result_sync = $get_sync->fetch();
131
+
```
132
+
112
133
### Builder
113
134
114
135
Additionally, the `Builder` implements an even simpler interface for commonly
0 commit comments