Fusion:Property

A property is a kind of lock with a special semantic allowing you to take possession of it either for a short while or semi-permanently. A short-term possession is called a lease, while a semi-permanent possession is a purchase. If nobody has possession of a property, it is considered available.

You can take possession of a property only when it is available The difference between leasing and purchasing a property is how further attempts to take possession are handled. Since there’s not much hope of getting a purchased property any time soon, such attempts will fail right away. However, a leased property may become available soon so attempts to get it will block until it becomes available (or purchased by someone else, which will return an error at that point).

You create a property with a call to fusion_property_init, which initially makes the property available. When you’re done with the property you need to free up its resources with fusion_property_destroy.

To try to take possession of a property you use fusion_property_lease or fusion_property_purchase. You give up your possession of a property by calling fusion_property_cede.

If you really want a property that isn’t available, you can call fusion_property_holdup to kill the process of fusionee that currently does have possession of it. This function returns an error if it's not called by the master of the world.