Skip to content

Commit

Permalink
drop workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Sep 6, 2024
1 parent dbd969e commit e177dcd
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/crystal/system/win32/iocp.cr
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,9 @@ module Crystal::IOCP
end

def self.run(handle, &)
# TODO: implement `pre_initialize` in the interpreter
{% if flag?(:interpreted) %}
yield OverlappedOperation.new(handle)
{% else %}
operation_storage = uninitialized ReferenceStorage(OverlappedOperation)
operation = OverlappedOperation.unsafe_construct(pointerof(operation_storage), handle)
yield operation
{% end %}
operation_storage = uninitialized ReferenceStorage(OverlappedOperation)
operation = OverlappedOperation.unsafe_construct(pointerof(operation_storage), handle)
yield operation
end

def self.unbox(overlapped : LibC::OVERLAPPED*)
Expand Down

0 comments on commit e177dcd

Please sign in to comment.