-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
It looks like the pending tasks queue is unused, since it is always set to an empty list when it is empty, and then set back to empty afterwards. Was this intended to be written differently to queue up the actions and batch them?
bucklescript-tea/src-ocaml/tea_app.ml
Lines 46 to 60 in 9411293
| let rec handler msg = | |
| match !pending with | |
| | None -> | |
| let () = pending := ((Some ([]))[@explicit_arity ]) in | |
| let newModel = pumperInterface.handleMsg (!model) msg in | |
| let () = model := newModel in | |
| (match !pending with | |
| | None -> | |
| failwith | |
| "INVALID message queue state, should never be None during message processing!" | |
| | ((Some ([]))[@explicit_arity ]) -> pending := None | |
| | ((Some (msgs))[@explicit_arity ]) -> | |
| let () = pending := None in List.iter handler (List.rev msgs)) | |
| | ((Some (msgs))[@explicit_arity ]) -> | |
| pending := ((Some ((msg :: msgs)))[@explicit_arity ]) in |
Metadata
Metadata
Assignees
Labels
No labels