{"name":"BIS_fnc_priorityQueue_PopItem","operator":null,"title":"BIS fnc priorityQueue PopItem","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_priorityQueue_PopItem","revid":274273,"updated":"2021-06-13T01:19:49Z","groups":["Priority Queue"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.86"}],"since":{"game":"arma3","name":"Arma 3","version":"1.86"},"arma3_since":"1.86","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"/*\n\nPops the item with the highest priority from the Queue (item with highest index). The item is removed from the Queue. Complexity: O(1)","syntaxes":[{"syntax":"[] call BIS_fnc_priorityQueue_PopItem","since":null,"effect":null,"exec":null,"params":[{"name":"_handle","type":"Number","types":["Number"],"optional":false,"default":null,"description":"Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n_keep:BOOL - if true, the item is not removed from the Queue","since":null,"text":"INT - Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n_keep:BOOL - if true, the item is not removed from the Queue","source":"docblock"}],"returns":{"type":"Anything","types":["Anything"],"description":null,"text":"_item:ANY - the item stored in the Queue","source":"docblock"}}],"examples":[{"text":"```sqf\n_myItem = [_priorityQueue_1] call BIS_fnc_PriorityQueue_PopItem;\n```","code":["_myItem = [_priorityQueue_1] call BIS_fnc_PriorityQueue_PopItem;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Priority Queue","Functions","Introduced with Arma 3 version 1.86"],"docblock":{"author":"Zozo","description":"/*\n\nPops the item with the highest priority from the Queue (item with highest index). The item is removed from the Queue. Complexity: O(1)","params":[{"index":null,"name":"_handle","types":["Number"],"optional":false,"default":null,"description":"Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n_keep:BOOL - if true, the item is not removed from the Queue","text":"INT - Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n_keep:BOOL - if true, the item is not removed from the Queue"}],"returns":{"types":["Anything"],"text":"_item:ANY - the item stored in the Queue"},"examples":["_myItem = [_priorityQueue_1] call BIS_fnc_PriorityQueue_PopItem;"],"syntax":"_item:ANY = [_handle] call BIS_fnc_PriorityQueue_PopItem;","execution":null,"notes":null,"requirements":null,"meta":{},"text":"/*\n    Author: Zozo\n\n    Description:\n    Pops the item with the highest priority from the Queue (item with highest index).\n    The item is removed from the Queue.\n    Complexity: O(1)\n\n    Parameters:\n    _handle:INT - Queue handle (get it with BIS_fnc_PriorityQueue_Init)\n    _keep:BOOL - if true, the item is not removed from the Queue\n\n    Returns:\n    _item:ANY - the item stored in the Queue\n\n    Syntax:\n    _item:ANY = [_handle] call BIS_fnc_PriorityQueue_PopItem;\n\n    Example:\n    _myItem = [_priorityQueue_1] call BIS_fnc_PriorityQueue_PopItem;"},"filled_from_docblock":["description","params","returns","examples"]}