Skip to content

Conversation

@clue
Copy link
Member

@clueclue commented Dec 4, 2017

Builds on top of #102

jsor
jsor approved these changes Dec 4, 2017
@WyriHaximusWyriHaximus merged commit f6dbe84 into reactphp:masterDec 4, 2017
@clueclue deleted the active branch December 4, 2017 15:39
@clueclue mentioned this pull request Apr 5, 2018
@dearkey
Copy link

dearkey commented Jan 26, 2019

how to check now if a timer is active when isTimerActive() is removed?

@clue
Copy link
MemberAuthor

clue commented Jan 27, 2019

@dearkey Good question, can you gist your use case and the problem you're trying to solve? During our discussions for this ticket and #102 we didn't come up with any use cases for this API, so we decided to remove it as part of the API cleanup. Likewise, this ticket hasn't been referenced for more than a year.

@dearkey
Copy link

i use now a global variable to set the active state. when i use a addPeriodicTimer to start an other one i have to check if its already running. because the second will be stopped when nothing is to do.

@clue
Copy link
MemberAuthor

clue commented Jan 27, 2019

@dearkey The way I understand this, this sounds like a reasonable approach 👍

Using an additional variable to hold this application state is a pattern we see in a number of applications (e.g. https://github.com/clue/reactphp-ssh-proxy/blob/c1732bad827672d644ea28f4806e08b86271608a/src/SshSocksConnector.php#L168-L171 and many others) and it's my understanding this solves this problem much better than exposing this state in this lower-level component 👍

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@clue@dearkey@jsor@WyriHaximus