runserver goes into an infinite loop after first request on OSX.
|Reported by:||loic84||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The following snippet causes an infinite loop and its customary 100% CPU usage:
events = kqueue.control(, 1) # After a request, reload the set of watched files. if len(events) == 1 and events.ident == watcher.fileno(): continue
This is because the event isn't currently cleared, so once the condition becomes
True, it remains so indefinitely.