Combine sugar, cornstarch and salt in sauce pan and stir well. Combine egg yolks and milk and beat well. Gradually add to sugar mixture, stirring constantly. Cook over medium heat, until thickened. Keep stirring. Remove from heat. Stir in butter, vanilla, and coconut.
Immediately pour into baked pastry shell. Cover with a wax paper tent and cool for 30 minutes. Then chill until firm. Add whipped cream and toasted coconut (if desired) and serve.