xenanetworks / open-automation-chimera-core

XOA Chimera Core
https://docs.xenanetworks.com/projects/xoa-chimera-core
Apache License 2.0
0 stars 0 forks source link

Resource reservation function naming #3

Closed ArtemConstantinov closed 1 year ago

ArtemConstantinov commented 1 year ago

I remember we discussed that think before as we will get more understanding of API layout we be able to give proper naming to the functions. What do you think if in stead of reserve_if_not() we can call them just reserve(mode=<Soft> | <Strict>) where mode parameter define of what reservation strategy to apply

<Soft> - Breack reservation if resource is already reserved by someone
<Strict> - Kick out anyone else and reserve the resource
fpfeng commented 1 year ago

These two mode looks the same to me, I prefer "soft" meaning reserve if it is no owner

ArtemConstantinov commented 1 year ago

In what way they are the same? if in one condition we are not reserving if resource is reserved by someone else but in other condition we forcefully relinquish...

fpfeng commented 1 year ago

now I understand, no further questions.