mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
kernel: Add interrupt function to C header
Calling interrupt can halt long-running functions associated with objects that were created through the passed-in context.
This commit is contained in:
@@ -676,6 +676,11 @@ btck_Context* btck_context_copy(const btck_Context* context)
|
||||
return btck_Context::copy(context);
|
||||
}
|
||||
|
||||
int btck_context_interrupt(btck_Context* context)
|
||||
{
|
||||
return (*btck_Context::get(context)->m_interrupt)() ? 0 : -1;
|
||||
}
|
||||
|
||||
void btck_context_destroy(btck_Context* context)
|
||||
{
|
||||
delete context;
|
||||
|
||||
Reference in New Issue
Block a user