# Stack/Queue Actions don't work properly in async groups

**URL:** https://www.finalbuilder.com/forums/t/stack-queue-actions-dont-work-properly-in-async-groups/3432
**Category:** Bugs
**Created:** [April 3, 2012, 1:02am UTC](https://www.finalbuilder.com/forums/t/stack-queue-actions-dont-work-properly-in-async-groups/3432 "2012-04-03T01:02:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 3, 2012, 1:02am UTC](https://www.finalbuilder.com/forums/t/stack-queue-actions-dont-work-properly-in-async-groups/3432/1 "2012-04-03T01:02:53Z")

</div>

Hi,   
  
 the Stack/Queue Action “Pop” has the nice property “Wait for a value to appear” where you can define the amount of time to wait.   
 Unfortunately, the pop action apparently locks the queue while it waits for a value, so every push or insert action has to wait until the pop action times out and releases the queue.   
 This makes “Wait for a value to appear” property useless, since no new value can appear while the action waits.   
  
 If required I can provide a simple test project that shows this problem.   
  
 Regards,   
 Manuel Pöter

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 3, 2012, 2:47am UTC](https://www.finalbuilder.com/forums/t/stack-queue-actions-dont-work-properly-in-async-groups/3432/2 "2012-04-03T02:47:53Z")

</div>

An example would certainly make it easier to reproduce the problem here.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [April 5, 2012, 9:26am UTC](https://www.finalbuilder.com/forums/t/stack-queue-actions-dont-work-properly-in-async-groups/3432/3 "2012-04-05T09:26:41Z")

</div>

Hi,   
  
 since I found no way to attach the project I simply post the (stripped down) fbp7-code:   
  
 [code]\<?xml version=“1.0” encoding=“UTF-16”?\>\<VSXML\> \<Object Class=“TFBProject” XMLID="{95A37D6D-5219-4C98-9163-B09F2DDE2EEB}"\> \<Property MultiValue=“0” name=“ProjectID” type=“string”\>{730CEF27-A269-4DE4-8EBC-EC18F156E776}\</Property\> \<Object Class=“TFBActionListCollection” XMLID="{7E9CB682-7766-4B2A-A94A-6ECD862574DD}"\> \<Object Class=“TFBActionList” XMLID="{637F9313-CF56-444A-9B2D-B2560FAFA05A}"\> \<Property name=“IsFailure” type=“Boolean”\>False\</Property\> \<Property name=“IsMain” type=“Boolean”\>True\</Property\> \<Property MultiValue=“0” name=“Name” type=“string”\>Main\</Property\> \<Property MultiValue=“0” name=“UniqueID” type=“string”\>{C7637A65-5C90-41B7-91A4-30F8EB2D1D89}\</Property\> \<Object Class=“TFBAction” XMLID="{640D0918-17F4-4A07-BC14-D8B31674B28E}"\> \<Property MultiValue=“0” name=“ActionDescription” type=“string”\>FinalBuilderAction\</Property\> \<Object Class=“TFBListDefineAction” XMLID="{249ACE9D-0BD5-448E-BED5-68CC62535333}"\> \<Property MultiValue=“0” name=“ListName” type=“string”\>TestQueue\</Property\> \<Property name=“ListObject” type=“IFBList” XMLID="{38A2A7CF-8EE4-4FFD-A50F-65B783E399F7}"/\> \<Object Class=“TFBListObject” XMLID="{38A2A7CF-8EE4-4FFD-A50F-65B783E399F7}"\> \<Property name=“ListType” type=“TFBListType”\>ltQueue\</Property\> \<Property MultiValue=“0” name=“Name” type=“string”\>TestQueue\</Property\> \</Object\> \</Object\> \<Object Class=“TFBParallelGroupAction” XMLID="{140A4058-DF28-4466-9CDA-FA71E9D270B8}"\> \<Object Class=“TFBDelayAction” XMLID="{5A040A2B-E775-4039-B609-CE47F0A302F4}"\> \<Property MultiValue=“1” name=“ActionDescription” type=“string”\> \<![CDATA[Delay 200ms - make sure the push operation starts after the pop]]\> \</Property\> \<Property name=“Delay” type=“Cardinal”\>200\</Property\> \<Object Class=“TFBListPushAction” XMLID="{E1679103-3994-4737-8D63-3C33DEC316DC}"\> \<Property MultiValue=“1” name=“ActionDescription” type=“string”\> \<![CDATA[Push items on Queue [TestQueue]]]\> \</Property\> \<Property MultiValue=“0” name=“Item” type=“string”\>test\</Property\> \<Property MultiValue=“0” name=“ListName” type=“string”\>TestQueue\</Property\> \</Object\> \</Object\> \<Object Class=“TFBListPopAction” XMLID="{5E7D65F0-93F4-4227-BE79-92523D81DBC1}"\> \<Property MultiValue=“1” name=“ActionDescription” type=“string”\> \<![CDATA[Pop item from Queue [TestQueue]]]\> \</Property\> \<Property MultiValue=“0” name=“ListName” type=“string”\>TestQueue\</Property\> \<Property name=“WaitTime” type=“Cardinal”\>10\</Property\> \</Object\> \</Object\> \</Object\> \<Object Class=“TFBActionListParametersCollection” XMLID="{E0F2EABD-A22B-46E1-A237-ABCF86C9EA07}"/\> \</Object\> \<Object Class=“TFBActionList” XMLID="{32F57990-DCAA-4FBE-AD3E-540EAB0AB944}"\> \<Property name=“IsFailure” type=“Boolean”\>True\</Property\> \<Property name=“IsMain” type=“Boolean”\>False\</Property\> \<Property MultiValue=“0” name=“Name” type=“string”\>OnFailure\</Property\> \<Property MultiValue=“0” name=“UniqueID” type=“string”\>{92D86DFB-E090-437C-A412-E6C5DA55B2A1}\</Property\> \<Object Class=“TFBAction” XMLID="{FA86AB26-0F0F-42B5-BBDE-F19B1D70BC5C}"/\> \<Object Class=“TFBActionListParametersCollection” XMLID="{5A680C98-303A-40E4-B46A-4F55F435FDDE}"/\> \</Object\> \</Object\> \</Object\>\</VSXML\>[/code]   
  
 Another flaw is, that it’s not possible to terminate the running project while the pop action is waiting/blocking the queue.   
  
 BTW: in the meantime I wrote my own queue actions using the BlockingCollection\<T\> from System.Collections.Generic that does not suffer from these problems - I can provide them here as well if you are interested.   
  
 Regards,   
 Manuel Pöter

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [April 11, 2012, 8:08am UTC](https://www.finalbuilder.com/forums/t/stack-queue-actions-dont-work-properly-in-async-groups/3432/4 "2012-04-11T08:08:17Z")

</div>

Hi Manuel   
  
 Thanks for the example, this build includes the fix :   
  
 [http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700\_1837.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_1837.exe)
