简体   繁体   中英

Thread Locking issue with SmartXLS

WE have been seeing issue with SmartXLS when we run it with multi threaded environment, does anyone have seen issue? we are using java 1.7 SmartXLS 4.6

 java.lang.Thread.State: BLOCKED
    at com.smartxls.a.aj.a(SourceFile:44)
    - waiting to lock <6521da27> (a com.smartxls.a.ai$a) owned by "GS-jobListenerPollingContainer-3" t@70
    at com.smartxls.a.aj.a(SourceFile:38)
    at com.smartxls.a.aj.a(SourceFile:28)
    at com.smartxls.a.de.a(SourceFile:173)
    at com.smartxls.a.de.a(SourceFile:97)
    at com.smartxls.a.y.T(SourceFile:1598)
    at com.smartxls.a.y.Q(SourceFile:1340)
    at com.smartxls.a.bq.a(SourceFile:391)
    at com.smartxls.a.h.b(SourceFile:1220)
    at com.smartxls.a.h.a(SourceFile:279)
    at com.smartxls.ss.af.f(SourceFile:2009)
    at com.smartxls.ss.af.a(SourceFile:2635)
    at com.smartxls.ss.af.b(SourceFile:2673)
    at com.smartxls.ss.af.a(SourceFile:1181)
    at com.smartxls.ss.af.a(SourceFile:1198)
    at com.smartxls.ss.aj.a(SourceFile:7884)
    at com.smartxls.ss.aj.a(SourceFile:7874)
    at com.smartxls.WorkBook.write(SourceFile:2363)

You should use getLock/releaseLock to sync the background thread calculations.

            try
            {
                workbook.getLock();
                workbook.read(...);
                ...
                workbook.write(...);
            }
            finally
            {
                workbook.releaseLock();
            }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM