Up – Package index » bonsai » Sources » bonsai.bench » cleanup.mlbonsai Library bonsai Library bonsai.bench Library bonsai.bonsai_experimental_dagviz Library bonsai.driver Library bonsai.example_chat_open_source_native Library bonsai.example_chat_open_source_native_common Library bonsai.extra Library bonsai.feather_icon Library bonsai.focus_ring Library bonsai.jsoo_weak_collections Library bonsai.kado Library bonsai.ppx_bonsai_expander Library bonsai.protocol Library bonsai.quickcheck Library bonsai.quickcheck_test Library bonsai.tailwind_colors Library bonsai.test Library bonsai.uri_parsing Library bonsai.vdom_node_with_map_children Library bonsai.web Library bonsai.web_test Library bonsai.web_ui_accordion Library bonsai.web_ui_auto_generated Library bonsai.web_ui_common_components Library bonsai.web_ui_drag_and_drop Library bonsai.web_ui_element_size_hooks Library bonsai.web_ui_extendy Library bonsai.web_ui_file Library bonsai.web_ui_file_from_web_file Library bonsai.web_ui_form Library bonsai.web_ui_form_view Library bonsai.web_ui_freeform_multiselect Library bonsai.web_ui_gauge Library bonsai.web_ui_multi_select Library bonsai.web_ui_partial_render_table Library bonsai.web_ui_partial_render_table_protocol Library bonsai.web_ui_popover Library bonsai.web_ui_query_box Library bonsai.web_ui_reorderable_list Library bonsai.web_ui_scroll_utilities Library bonsai.web_ui_toggle Library bonsai.web_ui_typeahead Library bonsai.web_ui_url_var Library bonsai.web_ui_view Library bonsai.web_ui_visibility Library bonsai.web_ui_widget Library bonsai_test_dot Library ppx_bonsai Sources bonsai bonsai.bench bonsai.bonsai_experimental_dagviz bonsai.driver bonsai.example_chat_open_source_native bonsai.example_chat_open_source_native_common bonsai.extra bonsai.feather_icon bonsai.focus_ring bonsai.jsoo_weak_collections bonsai.kado bonsai.ppx_bonsai_expander bonsai.protocol bonsai.quickcheck bonsai.quickcheck_test bonsai.tailwind_colors bonsai.test bonsai.uri_parsing bonsai.vdom_node_with_map_children bonsai.web bonsai.web_test bonsai.web_ui_accordion bonsai.web_ui_auto_generated bonsai.web_ui_common_components bonsai.web_ui_drag_and_drop bonsai.web_ui_element_size_hooks bonsai.web_ui_extendy bonsai.web_ui_file bonsai.web_ui_file_from_web_file bonsai.web_ui_form bonsai.web_ui_form_view bonsai.web_ui_freeform_multiselect bonsai.web_ui_gauge bonsai.web_ui_multi_select bonsai.web_ui_partial_render_table bonsai.web_ui_partial_render_table_protocol bonsai.web_ui_popover bonsai.web_ui_query_box bonsai.web_ui_reorderable_list bonsai.web_ui_scroll_utilities bonsai.web_ui_toggle bonsai.web_ui_typeahead bonsai.web_ui_url_var bonsai.web_ui_view bonsai.web_ui_visibility bonsai.web_ui_widget bonsai_test_dot ppx_bonsai 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
open ! Core
type packed = T : Runner . t -> packed
let ( most_recent_driver : packed option ref ) = ref None
let register_driver driver = most_recent_driver := Some ( T driver )
let invalidate_observers =
Core_bench_js . Test . create_with_initialization
~name: "cleaning up observers..."
( fun ` init ->
( match ! most_recent_driver with
| None -> ( )
| Some ( T driver ) -> Runner . invalidate_observers driver ) ;
most_recent_driver := None ;
fun ( ) -> ( ) )
;;