Hi,
We are not sure what you meant by "there is no thread separation guaranteed". The thread separation are guaranteed because each thread uses their own copy of values. If you do not like the static flavor, you can use one of the flavor that takes an HtmlToPdfOptions argument such as this one:
http://www.essentialobjects.com/doc/4/eo.pdf.htmltopdf.converturl_overload_8.aspxThe code would be something like this:
Code: C#
//Create your own copy of HtmlToPdfOptions
HtmlToPdfOptions options = new HtmlToPdfOptions();
.....set your options member....
//Use your own copy of HtmlToPdfOptions
HtmlToPdf.ConvertUrl(url, file_name, options);
In either case, you should not have problem regardless you use the old days Thread class or the new fancy Tasks and async feature. Tasks and async feature are built on top of thread pool and they do not change anything beneath. Thus using Tasks or await (these are just syntax candy) makes no difference from the converter point of view. So there is no need for you to wrap your code inside "single thread". In another word, if you run into problems when using .NET 4.5's Tasks and async, the problem would be somewhere else.
One thing you do need to keep in mind is that converting HTML to PDF is a rather expensive task --- it is both network intensive (during the load stage) and CPU intensive (during the conversion stage). So it's not that you have more thread it will run faster. For example, if your system only have a single CPU, then it would definitely help if you have 2 threads ---- while one is waiting on the network the other can use the CPU. However if you have 10 threads, then they will just be over competing and constantly rob each other off. In that case you will start to get time out errors and you are basically overloading your server and that's not an issue can be resolved by multi-threading.
Thanks!