You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by gi...@git.apache.org on 2017/08/12 01:08:15 UTC

[GitHub] ccollins476ad opened a new pull request #488: Delay start events until end of main()

ccollins476ad opened a new pull request #488: Delay start events until end of main()
URL: https://github.com/apache/mynewt-core/pull/488
 
 
   Packages currently have two initialization phases: 1) init, and 2) start:
   
   *init:* Runs automatically during sysinit.
   *start:* A start event can optionally be put on the package's event queue; it runs when the event is processed.
   
   The second phase is useful when the package has some settings that must be configure at runtime, but before the package starts.
   
   The problem arises when a package is assigned a dedicated task and event queue.  If the task is higher priority than the default task, it will preempt the default task with the package's start event, before the application has had a chance to finish configuring the package.
   
   This PR makes it so that start events always run in the default task, even if the package has been configured to run in a different one.  This ensures the start events won't run until the end of main() when the default event queue is processed.  Since a start event always runs in the default task, it is important that they not do much more than configure their package.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services