What I am trying to do: I want to create an agent in one process and at the end of the process, add it to a resource pool so that another process that can pick it up and process it further. The two processes are not synchronized so the first process may complete and place the new agent into the pool without a second process in progress to seize it again from the pool and process further, or the second process may start first and enter a wait state at the pool waiting for a new agent to be placed into the pool. The pool can also be initialized with a number of agents that the second process can seize without the first process having deposited a new resource into the pool.
What I can see in the documentation:
Any suggestions will be highly appreciated
You can only change the capacity of your ResourcePool using myPool.set_Capacity(int)
.
If it is larger than the prior capacity, it will add a resource agent for you, else it will remove some.
To add 1 more, call myPool.set_Capacity(myPool.size()+1)
If you need more advanced functionality, you have to create it yourself using your custom, agent-based resource pool (ie code yourself).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.