GCNFrame icon indicating copy to clipboard operation
GCNFrame copied to clipboard

fix: macOS biodata encoding compatibility

Open alvintho opened this issue 9 months ago • 0 comments

Related issue: https://github.com/deepomicslab/GCNFrame/issues/11#issue-2884724673

Cross-platform encoding compatibility fix

Problem

The current encoding implementation using multiprocessing.Pool fails on macOS due to its different process forking behavior. This affects users trying to run the encoding function on macOS systems.

Solution

Implemented OS-specific parallel processing:

  • Uses ThreadPoolExecutor for macOS environments
  • Retains multiprocessing.Pool for other operating systems (Linux/Windows)

Technical Details

  • macOS handles process forking differently ("copy-on-write"), causing issues with multiprocessing.Pool
  • ThreadPoolExecutor provides a more reliable parallel processing solution for macOS
  • Added OS detection using platform.system() to automatically choose the appropriate method

Result after fix: image

alvintho avatar Apr 11 '25 15:04 alvintho