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
An example would certainly make it easier to reproduce the problem here.
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
Hi Manuel
Thanks for the example, this build includes the fix :
http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_1837.exe