[#LockedPool-2constructor-07]
= xref:LockedPool.adoc[LockedPool]::LockedPool
:relfileprefix: ../
:mrdocs:

Create a new LockedPool&period; This takes ownership of the MemoryPageLocker, you can only instantiate this with LockedPool(std&colon;&colon;move(&period;&period;&period;))&period;

== Synopsis

Declared in `&lt;support&sol;lockedpool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
LockedPool(
    std::unique&lowbar;ptr&lt;LockedPageAllocator&gt; allocator,
    xref:LockedPool/LockingFailed_Callback.adoc[LockingFailed&lowbar;Callback] lf&lowbar;cb&lowbar;in = nullptr);
----

== Description

The second argument is an optional callback when locking a newly allocated arena failed&period; If this callback is provided and returns false, the allocation fails (hard fail), if it returns true the allocation proceeds, but it could warn&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *allocator*
| The page allocator whose ownership the pool takes&period;
| *lf&lowbar;cb&lowbar;in*
| Optional callback invoked when locking a new arena fails&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
