reactphp-zenity icon indicating copy to clipboard operation
reactphp-zenity copied to clipboard

Support a mix of blocking and non-blocking PHP

Open bertvandepoel opened this issue 8 years ago • 2 comments

When updating a progress or pulse bar it would be very convenient if it was possible to still use blocking PHP.

Specifically, it is quite easy to imagine a developer wanting to display zenity progress on a large set of SQL queries, updating the progress bar as he goes through every step. Currently this is only possible by manually ticking the loop. It would be nice if there could be some kind of support for this.

bertvandepoel avatar Jul 13 '16 18:07 bertvandepoel

I agree that this would be convenient, but I'm unsure if this is actually feasible..

The current waitFor() method is out of place with the rest of this library, so perhaps it's best to remove this in a future version? Instead, I would suggest we give at least two examples that build on top of https://github.com/clue/php-block-react:

  1. wait for a zenity to quit
  2. start zenity, do blocking work, update zenity, do blocking work, close zenity

clue avatar Jul 13 '16 18:07 clue

Yeah, those seem much more in place. I think a clear distinction between those two strategies would also make the library much less confusing for new users to try out.

And of course it would be convenient for the kind of work I do as well.

bertvandepoel avatar Jul 13 '16 18:07 bertvandepoel