2013年2月5日

一个C++的轻量级的logger实现

摘要: 这里介绍了一个C++的轻量级的logger实现,可以参考参考。 阅读全文

posted @ 2013-02-05 18:42 fresky 阅读(566) 评论(0) 推荐(0) 编辑

C#中静态构造函数导致的一个deadlock

摘要: Eric Lipper的这篇博客举了一个C#中静态构造函数导致的deadlock的例子,很有意思。代码如下:class C{ static C() { // Let's run the initialization on another thread! var thread = new System.Threading.Thread(Initialize); thread.Start(); thread.Join(); } static void Initialize() { } static void Main() { }}原因很简单,静态构造函数需要在第... 阅读全文

posted @ 2013-02-05 18:07 fresky 阅读(183) 评论(0) 推荐(0) 编辑

在线C++编译器

摘要: 在线C++编译器列举了如下网站:LiveWorkspace(Clang 3.2, GCC 4.6.3 - 4.7.2)gcc.godbolt.org(Clang 3.0, GCC 4.5.3 - 4.8.0 prerelease, Intel ICC 13.0.1)Rise4Fun(Microsoft VC++ 2012 and November 2012 CTP)Stacked-Crooked(GCC 4.7)ideone.com(GCC 4.3.4 and 4.5.1)Comeau Test Drive(EDG 4.3.3) 阅读全文

posted @ 2013-02-05 17:45 fresky 阅读(443) 评论(0) 推荐(0) 编辑

导航