-
Notifications
You must be signed in to change notification settings - Fork 0
[URH-39] useWorker 신규 #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
멋져요 정배 님!👏🏻🔥
그런데 혹시 두 개 이상의 스레드를 사용할 수도 있을까요?
사용할 수 있다면 예시를 추가하거나 테스트 코드를 작성해봐도 좋을 것 같습니다!
현재 구현은 전용 워커(DedicatedWorker)를 사용하여 메인 스레드와 별도로 동작하도록 되어 있어, 워커 간의 직접적인 통신은 어려울 것 같습니다. 같은 작업을 수행하는 여러 개의 동일한 워커(전용 워커(DedicatedWorker))를 생성하는 것은 가능하지만, useWorker 내부에서는 1개의 워커만 생성되도록 했습니다. 혹시 여러 개의 워커를 사용해야 하는 특정 상황이 있다면, 알려주시면 감사하겠습니다. 워커를 통한 작업 경험이 많지 않아 어떤 상황에서 여러 스레드가 필요한지 잘 알지 못해, 피드백을 주시면 도움이 될 것 같습니다! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩
👾 Pull Request
1️⃣ Spec
메인 스레드가 UI 렌더링과 같은 다른 작업을 차질 없이 진행할 수 있도록 도와줍니다.
2️⃣ 변경 사항
3️⃣ 예시 코드
4️⃣ 관련 문서 (선택 사항)