title: native compiled stored procedure sp_getapplock alternative
body: <p>tldr; what is alternative of sp_getapplock in the native compiled stored procedure.</p>
  
  <p>I have a memory-optimized table and few indexes on it. it is mission critical app. I am using a memory-optimized table since is does minimal logging. I am developing order matching/trade matching engine. one order is inserted at a time and matched with open orders. it is not a bulk operation. I have tried with regular table, but I was not able to achieve throughput I require. the memory-optimized table has solved throughput issue. </p>
  
  <p>I want to restrict SQL server to not run more than one instance of the stored procedure. in the regular stored procedure, this can be achieved with sp_getapplock. how can I achieve this with the natively compiled stored procedure?</p>
  
  <p>I googled and did not found an answer. </p>