# Bug - Cannot call CLR constructor of builtin type

**URL:** <https://www.ruby-forum.com/t/bug-cannot-call-clr-constructor-of-builtin-type/168348>\
**Category:** IronRuby\
**Created:** [May 19, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/bug-cannot-call-clr-constructor-of-builtin-type/168348 "2009-05-19T21:08:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [May 19, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/bug-cannot-call-clr-constructor-of-builtin-type/168348/1 "2009-05-19T21:08:41Z")

</div>

FYI - [http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1306](http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1306)

I want to create a CLR Thread and set its AparmentState before calling  
Start on it. However, doing System::Threading::Thread.new calls the Ruby  
intialize method (since System::Threading::Thread and IronRuby’s Thread  
map to the same thing) which automatically calls Start. How can I create  
an STA thread?

> > > ts = System::Threading::ThreadStart.new { puts “in thread” }  
> > > =\> System.Threading.ThreadStart  
> > > ts.invoke  
> > > in thread  
> > > =\> nil  
> > > t = System::Threading::Thread.new ts  
> > > :0:in `new’: must be called with a block (ThreadError)  
> > > from :0

This is the converse case of  
[http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1082](http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1082).
