In the method of the present invention, an anti-virus scan of a file is
performed in real time. A thread manager (101) detects (202) that an
activity concerning a file has been initiated by a first thread.
Responsive to the detection, the thread manager (101) determines (204)
that a scan of the file should be conducted. The thread manager (101)
initiates (206) the scan of the file by a second thread, thereby enabling
the first thread to complete the activity concerning the file and to
perform other tasks while the scan occurs. The thread manager (101)
blocks (212) access to the file while the scan occurs.