Skip to content

Commit 49e2de5

Browse files
authored
Removed InterruptHandle, it was not used anywhere and support was removed form wasmtime in [v0.36.0](https://github.com/bytecodealliance/wasmtime/blob/75cd888e232aad18ac1c7bd0f40a6929ffba30c6/RELEASES.md#0360) (#164)
1 parent f3a383a commit 49e2de5

File tree

1 file changed

+0
-76
lines changed

1 file changed

+0
-76
lines changed

src/Store.cs

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -95,82 +95,6 @@ private static class Native
9595
internal readonly IntPtr handle;
9696
}
9797

98-
/// <summary>
99-
/// Represents a Wasmtime interrupt handle.
100-
/// </summary>
101-
public class InterruptHandle : IDisposable
102-
{
103-
/// <summary>
104-
/// Creates a new interrupt handle from the given store.
105-
/// </summary>
106-
/// <param name="store">The store to create the interrupt handle for.</param>
107-
public InterruptHandle(IStore store)
108-
{
109-
if (store is null)
110-
{
111-
throw new ArgumentNullException(nameof(store));
112-
}
113-
114-
handle = new Handle(Native.wasmtime_interrupt_handle_new(store.Context.handle));
115-
}
116-
117-
/// <summary>
118-
/// Interrupt any executing WebAssembly code in the associated store.
119-
/// </summary>
120-
public void Interrupt()
121-
{
122-
Native.wasmtime_interrupt_handle_interrupt(NativeHandle);
123-
}
124-
125-
/// <inheritdoc/>
126-
public void Dispose()
127-
{
128-
handle.Dispose();
129-
}
130-
131-
internal Handle NativeHandle
132-
{
133-
get
134-
{
135-
if (handle.IsInvalid)
136-
{
137-
throw new ObjectDisposedException(typeof(Store).FullName);
138-
}
139-
140-
return handle;
141-
}
142-
}
143-
144-
internal class Handle : SafeHandleZeroOrMinusOneIsInvalid
145-
{
146-
public Handle(IntPtr handle)
147-
: base(true)
148-
{
149-
SetHandle(handle);
150-
}
151-
152-
protected override bool ReleaseHandle()
153-
{
154-
Native.wasmtime_interrupt_handle_delete(handle);
155-
return true;
156-
}
157-
}
158-
159-
private static class Native
160-
{
161-
[DllImport(Engine.LibraryName)]
162-
public static extern IntPtr wasmtime_interrupt_handle_new(IntPtr context);
163-
164-
[DllImport(Engine.LibraryName)]
165-
public static extern void wasmtime_interrupt_handle_delete(IntPtr handle);
166-
167-
[DllImport(Engine.LibraryName)]
168-
public static extern IntPtr wasmtime_interrupt_handle_interrupt(Handle handle);
169-
}
170-
171-
private readonly Handle handle;
172-
}
173-
17498
/// <summary>
17599
/// An interface implemented on types that behave like stores.
176100
/// </summary>

0 commit comments

Comments
 (0)