Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can the ptype definition be modified to always start an instance (whether or not one is already running)?

0
Posted

Can the ptype definition be modified to always start an instance (whether or not one is already running)?

0

No. Messages to a ptype are blocked during start-up until the ptype either replies to the message, or issues a tt_message_accept call. However, the implementation of the ptype can include tt_message_reject for any request it gets that do not have a status of TT_WRN_START_MESSAGE. All requests will then be delivered to (and rejected by) all running instances of the ptype before a new one gets started. This method will be slow if many of these ptypes are running at the same time, or if the message contains a large amount of data. Alternatively, you could use tt_message_accept, which basically unblocks messages to the ptype.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123