이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
백그라운드 처리
코드를 백그라운드에서 실행하면서 동시에 다른 코드도 실행
MATLAB®에서 코드를 실행할 경우 이 코드의 실행이 끝날 때까지 기다려야 다른 코드를 실행할 수 있습니다. 백그라운드 풀을 사용하면 코드를 백그라운드에서 실행하면서 동시에 다른 코드도 실행할 수 있습니다. 예를 들어, 백그라운드에서 계산을 수행하는 동안 반응성을 유지하는 앱을 만들 수 있습니다.
함수를 백그라운드에서 실행하려면 백그라운드 풀을 지정하여 parfeval
을 사용합니다. parfeval
은 백그라운드에서 실행되는 함수를 나타내는 Future
객체를 즉시 반환합니다. Future
에서 결과를 가져오려면 fetchOutputs
를 호출합니다.
함수
도움말 항목
백그라운드 처리 시작하기
- Asynchronous Functions
Learn about how to run code in the background in MATLAB. - Run Functions in Background
Useparfeval
andbackgroundPool
to run functions in the background. - Run MATLAB Functions in Thread-Based Environment
Check support for MATLAB functions that you want to run in the background.
응용 사례
- Update Wait Bar While Functions Run in the Background
UseafterEach
to update a wait bar while you run functions in the background. - Create Responsive Apps by Running Calculations in the Background
Improve the responsiveness of apps you create with MATLAB App Designer by using the background pool.