Skip to content

WIP: Polling the parent process on Windows#192

Open
mrkn wants to merge 1 commit into
masterfrom
poll_parent_process_windows
Open

WIP: Polling the parent process on Windows#192
mrkn wants to merge 1 commit into
masterfrom
poll_parent_process_windows

Conversation

@mrkn

@mrkn mrkn commented Feb 23, 2019

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an initial Windows-specific path for the “parent process poller” in IRuby::Kernel, intended to support interrupt-based shutdown detection on Windows while preserving the existing Unix polling behavior.

Changes:

  • Introduces Windows branching in init_parent_process_poller, reading JPY_EVENT_INTERRUPT and calling a new Windows poller method.
  • Moves the parent_pid > 1 guard to only apply to the non-Windows branch.
  • Adds a new (currently placeholder) start_parent_process_pollar_windows method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/iruby/kernel.rb
Comment on lines 179 to 183
case RUBY_PLATFORM
when /mswin/, /mingw/
# TODO
interrupt_handle = Integer(ENV.fetch('JPY_EVENT_INTERRUPT', 0))
@parent_poller = start_parent_process_pollar_windows(parent_pid, interrupt_handle)
else
Comment thread lib/iruby/kernel.rb
Comment on lines +207 to +211
def start_parent_process_pollar_windows(parent_handle, interrupt_handle)
Thread.start do
IRuby.logger.warn("parent process poller thread started.")
# TODO
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants