Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unexpected calls to unscheduled selector in long updates. #17431

Merged
merged 1 commit into from
Mar 7, 2017

Conversation

j-jorge
Copy link
Contributor

@j-jorge j-jorge commented Mar 2, 2017

If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.

This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.

If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.

This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.
@minggo
Copy link
Contributor

minggo commented Mar 7, 2017

The codes looks good to me. I will test it.

@minggo minggo merged commit 67d16be into cocos2d:v3 Mar 7, 2017
@minggo minggo added this to the 3.15 milestone Mar 7, 2017
@minggo
Copy link
Contributor

minggo commented Mar 7, 2017

thanks, it works good

stevetranby added a commit to stevetranby/cocos2d-x that referenced this pull request Mar 9, 2017
…futurePRs

* commit '5c0c6d2e1e4b1772efc239d23f8cdaf8ce79a898':
  More powerful Uri class, adds unit test for Uri class. Refactors some code in SocketIO & Websocket. (cocos2d#17472)
  Prevent signed/unsigned mismatch (cocos2d#17468)
  fix the issue that onEnterTransitionDidFinish() is not invoked at first scene change (cocos2d#17466)
  csbload error bug (cocos2d#17465)
  *Fix: GLThread and other threads access sDownloaderMap in a thread-unsafe way, which will result in crash in some occasion on Android. (cocos2d#16326)
  fixed cocos2d#17416: Wrong default port of SocketIO connection. (cocos2d#17459)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17458)
  fixed cocos2d#17427: lws_parse_url has wrong behavior, it parses ’ws://domain.com/abc/d’ to ‘path: abc/d’ rather than ‘path: /adb/d’. (cocos2d#17455)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17456)
  Prevent unexpected calls to unscheduled selector in long updates. (cocos2d#17431)
  fix the broken of lua-tests after PR cocos2d#17445 was merged. (cocos2d#17454)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17453)
  Solve the error logic in spine runtime. (cocos2d#17448)
  cocos2d::Sequence::isDone() checks that the last action is actually done. (cocos2d#17437)
  Websocket bug fix after PR#17440 was merged. (cocos2d#17450)
  [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#17449)
  Some fixes for search paths: (cocos2d#17435)
  update external version (cocos2d#17446)
  fixed cocos2d#17433: [webSocket ] webSocket random crash in win32 (cocos2d#17440)
  Fix some local variable names in tests (cocos2d#17445)

# Conflicts:
#	web
at-mikec pushed a commit to brooklynpacket/cocos2d-x that referenced this pull request Feb 22, 2019
…cos2d#17431)

If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.

This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.

(cherry picked from commit 67d16be)
at-mikec pushed a commit to brooklynpacket/cocos2d-x that referenced this pull request Feb 22, 2019
…cos2d#17431)

If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.

This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.

(cherry picked from commit 67d16be)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants