Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Multithreading |
Post Reply |
Author | |
alecd4
Beginner Joined: 29 Sep 11 Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 21 Apr 12 at 10:47PM |
If this library tread safe? I am using the library in a windows service (C#) where I can have multiple threads that create/update pdf documents.
Don't see any problems so far. Should I expect any? |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Running QPL in a service could be a problem because we use GDI+ for many PDF functions. "GDI+ functions and classes are not supported for use within a Windows service. Attempting to use these functions and classes from a Windows service may produce unexpected problems, such as diminished service performance and run-time exceptions or errors."
|
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(0)
|
Do you have a list of these functions? My company is using it in a service and so far we have not had any problems. But I'd like to very for sure we wouldn't.
Wheeley |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
We haven't done any testing with using QPL in a Windows Service.
The GDI+ function calls in QPL are used for the Rendering and Printing functions. Wheeley - Which QPL calls do you currently use in your Windows Service ? This might help us and others work out which functions, if any, are unsafe to use in a Windows Service ?
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Also, we have recently completed more extensive testing on the library for thread safety and have found a few small problems that have been fixed in the 8.15 release and there are further fixes coming for the 8.16 beta 1 release.
If each thread uses a new instance of QuickPDF Library then it should work pretty well when using 8.15 or 8.16 versions of QPL.
|
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(0)
|
We use the following when running in a service:
AddToFileList AnalyseFile ClearFileList CompressContent CreateLibrary Decrypt DecryptFile DeleteAnalysis DocumentCount EncodePermissions EncryptFile EncryptionStatus FileListItem GetAnalysisInfo GetDocumentID LastErrorCode LibraryVersion LoadFromFile MergeFileListFast NewDocument NewOutline PageCount PrintDocument PrintOptions RemoveDocument SaveToFile SelectDocument SelectPage SetPageLayout SetPageMode SetTempFile SetTempPath SignFile TestTempPath Unlock UnlockKey Wheeley |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Wheely,
PrintDocument uses the GDI+ functions to render the document for printing. If it is working correctly for you then it seems Microsoft might are just being over cautious. Not of the other functions you use would require GDI+. Andrew.
|
|
Wheeley
Senior Member Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
Post Options
Thanks(0)
|
The catch with the function using GDI+ is how you run your service. Microsoft might indeed be correct when you run the service using "Local Administrator". Because of other issues we require our service to run using a named user. So more investigation is needed by all.
Wheeley |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store